<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IPTABLES - RULES in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304498#M34402</link>
    <description>&lt;P&gt;Shalom,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://fs-security.com/" target="_blank" rel="noopener"&gt;http://fs-security.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I find this product substantially decreases the difficulty and manageability of these rules.&lt;BR /&gt;&lt;BR /&gt;I use it to build firewall protected routers, exposed on the public internet. It has allowlist or denylist mode which makes it much easier to control access in a corporate environment.&lt;BR /&gt;&lt;BR /&gt;Downside is its not been updated in a few years and it has no web based GUI configuration tool.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/P&gt;</description>
    <pubDate>Thu, 15 Apr 2021 11:27:46 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2021-04-15T11:27:46Z</dc:date>
    <item>
      <title>IPTABLES - RULES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304494#M34398</link>
      <description>Hi there&lt;BR /&gt;My task is to develop iptables rules for a small network. We have HTTP + VPN + Exchange + Active Directory. I've set the default INPUT policy to DROP and developed about 20 rules.&lt;BR /&gt;Now - my CTO says that there should be abould 1100 rules to start with.&lt;BR /&gt;I was playing with IPTABLES before but this is a compleatly new aproch to me.The problem is - he is usualy right.&lt;BR /&gt;Does anyone undersdand why so many rules in so small network ? Is there any way to automate the creation of those rules - i just don't feel like sitting in front of my computer editing manually 1100 rules. &lt;BR /&gt;Regards&lt;BR /&gt;Peter</description>
      <pubDate>Tue, 11 Nov 2008 23:27:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304494#M34398</guid>
      <dc:creator>Piotr Kirklewski</dc:creator>
      <dc:date>2008-11-11T23:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: IPTABLES - RULES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304495#M34399</link>
      <description>Does anyone undersdand why so many rules in so small network ? &lt;BR /&gt;&lt;BR /&gt;No. In fact, depending of what you really need, only a few rules are needed. From the security point of view, with only one rule you can deny all incoming traffic, pretty secure.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt; Is there any way to automate the creation of those rules - i just don't feel like sitting in front of my computer editing manually 1100 rules.&lt;BR /&gt;&lt;BR /&gt;Probably, you should use shorewall. There are other tools like firestarter. I prefer shorewall.</description>
      <pubDate>Thu, 13 Nov 2008 01:07:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304495#M34399</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2008-11-13T01:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: IPTABLES - RULES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304496#M34400</link>
      <description>There is no obvious reason to have 1100 rules. This is only if you haven't used the drop policy which wasn't always a standard praxis about 10 years ago.&lt;BR /&gt;&lt;BR /&gt;Long an obnoxious firewall scripts are just harder to administrate.&lt;BR /&gt;I would say you're doing it just right. Put default drop policy on input and then set up exceptions for the things you want to do.&lt;BR /&gt;I would recommend that you look into hashlimits thou since it's a perfect way to lower the impact of a DDoS.&lt;BR /&gt;&lt;BR /&gt;If you're just going to make a long long list of ports to be closed/opened a script could do this for you like this:&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;for i in $(cat list-of-ports.ext); do&lt;BR /&gt;   iptables blah blah blah :P&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Normally (unless you run SuSE or the alike) the firewall scripts is just a bash script that runs in your init so doing bash commands isn't an issue :)&lt;BR /&gt;&lt;BR /&gt;Hope my ranting gave anything :)&lt;BR /&gt;Best regards&lt;BR /&gt;Fredrik Eriksson</description>
      <pubDate>Thu, 13 Nov 2008 08:19:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304496#M34400</guid>
      <dc:creator>Fredrik.eriksson</dc:creator>
      <dc:date>2008-11-13T08:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: IPTABLES - RULES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304497#M34401</link>
      <description>I agree with Ivan, the simpler you make it, the more secure it is likely to be because its always going to be easier to see when changes are made etc, and to spot simple mistakes.&lt;BR /&gt;&lt;BR /&gt;I would suggest you start by drawing a network and dataflow map of your network and decide which services and ports you wish to allow. &lt;BR /&gt;&lt;BR /&gt;Next create a basic ruleset such as the one below, and then gradually add each service and (re)test:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh  &lt;BR /&gt;&lt;BR /&gt;IPT=/sbin/iptables  &lt;BR /&gt;&lt;BR /&gt;$IPT -F  &lt;BR /&gt;&lt;BR /&gt;#policies  &lt;BR /&gt;&lt;BR /&gt;$IPT -P OUTPUT ACCEPT  &lt;BR /&gt;$IPT -P INPUT DROP  &lt;BR /&gt;$IPT -P FORWARD DROP  &lt;BR /&gt;$IPT -t nat -P OUTPUT ACCEPT  &lt;BR /&gt;$IPT -t nat -P PREROUTING ACCEPT  &lt;BR /&gt;$IPT -t nat -P POSTROUTING ACCEPT  &lt;BR /&gt;&lt;BR /&gt;$IPT -N SERVICES  &lt;BR /&gt;&lt;BR /&gt;#drop spoofed packets  &lt;BR /&gt;$IPT -A INPUT --in-interface ! lo --source 127.0.0.0/8 -j DROP  &lt;BR /&gt;&lt;BR /&gt;#limit ping requests  &lt;BR /&gt;$IPT -A INPUT -p icmp -m icmp -m limit --limit 1/second -j ACCEPT  &lt;BR /&gt;&lt;BR /&gt;#drop bogus packets  &lt;BR /&gt;iptables -A INPUT   -m state --state INVALID -j DROP  &lt;BR /&gt;iptables -A FORWARD -m state --state INVALID -j DROP  &lt;BR /&gt;iptables -A OUTPUT  -m state --state INVALID -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags FIN,ACK FIN -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags ACK,PSH PSH -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags ACK,URG URG -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags SYN,FIN SYN,FIN -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags SYN,RST SYN,RST -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags FIN,RST FIN,RST -j DROP  &lt;BR /&gt;$IPT -t filter -A INPUT -p tcp --tcp-flags ALL FIN,PSH,URG -j DROP  &lt;BR /&gt;&lt;BR /&gt;#allowed inputs  &lt;BR /&gt;&lt;BR /&gt;$IPT -A INPUT --in-interface lo -j ACCEPT  &lt;BR /&gt;$IPT -A INPUT -j SERVICES  &lt;BR /&gt;&lt;BR /&gt;#allow responses  &lt;BR /&gt;$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT  &lt;BR /&gt;&lt;BR /&gt;#allow services  &lt;BR /&gt;$IPT -A SERVICES -p tcp --dport 22 -j ACCEPT  &lt;BR /&gt;$IPT -A SERVICES -p tcp --dport 8080 -j ACCEPT  &lt;BR /&gt;$IPT -A SERVICES -m iprange --src-range 192.168.1.1-192.168.1.254 -p tcp --dport 631 -j ACCEPT  &lt;BR /&gt;$IPT -A SERVICES -m iprange --src-range 192.168.1.1-192.168.1.254 -p udp --dport 631 -j ACCEPT  &lt;BR /&gt;&lt;BR /&gt;$IPT -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080  &lt;BR /&gt;$IPT -A FORWARD -p tcp --dport 8080 -j ACCEPT  &lt;BR /&gt;&lt;BR /&gt;Note: I lifted this script from the Linuxuser magazine, and if you search YouTube, you should find a series of videos explaning how this script works.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Andrew&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Nov 2008 08:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304497#M34401</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2008-11-13T08:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: IPTABLES - RULES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304498#M34402</link>
      <description>&lt;P&gt;Shalom,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://fs-security.com/" target="_blank" rel="noopener"&gt;http://fs-security.com/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I find this product substantially decreases the difficulty and manageability of these rules.&lt;BR /&gt;&lt;BR /&gt;I use it to build firewall protected routers, exposed on the public internet. It has allowlist or denylist mode which makes it much easier to control access in a corporate environment.&lt;BR /&gt;&lt;BR /&gt;Downside is its not been updated in a few years and it has no web based GUI configuration tool.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/P&gt;</description>
      <pubDate>Thu, 15 Apr 2021 11:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-rules/m-p/4304498#M34402</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2021-04-15T11:27:46Z</dc:date>
    </item>
  </channel>
</rss>

