<?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 question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761258#M1927</link>
    <description>Jeffery, &lt;BR /&gt;&lt;BR /&gt;Some thoughts:&lt;BR /&gt;&lt;BR /&gt;1) I have been using shorewall as the basis of my firewall (&lt;A href="http://www.shorewall.org" target="_blank"&gt;www.shorewall.org&lt;/A&gt; or search for it on freshmeat.net) and have found it to be a superior script, and reasonably easy to configure.&lt;BR /&gt;&lt;BR /&gt;2) You verified from the /var/log/messages that the packets are indeed being dropped by the policy rule. &lt;BR /&gt;&lt;BR /&gt;3) Even if you don't use shorewall, the author operates an email list that discusses cool hacks with iptables. Could be of interest.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Mark</description>
    <pubDate>Thu, 11 Jul 2002 00:02:35 GMT</pubDate>
    <dc:creator>Mark Fenton</dc:creator>
    <dc:date>2002-07-11T00:02:35Z</dc:date>
    <item>
      <title>iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761255#M1924</link>
      <description>I have RedHat 7.2 installed with 2.4.18 Kernel build with iptables support. I am trying to setup a firewall using iptables (getting away from ipchains) but seem to have a few problems.&lt;BR /&gt;&lt;BR /&gt;It appears that the default policy of DROP overrules any exceptions I put in. For example, if I set the default policy for both input and output to drop then enter the following iptables commands.&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -i eth0 -p tcp -d 192.168.1.253 --dport 22 -j ACCEPT&lt;BR /&gt;iptables -A OUTPUT -o eth0 -p tcp -s 192.168.1.253 --sport 22 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;I cannot ssh to the server (192.168.1.253)after entering these rules. sshd is running and the server is listening on port 22. Any ideas?&lt;BR /&gt;&lt;BR /&gt;--Anxiously awaits some light shed on this for me</description>
      <pubDate>Wed, 10 Jul 2002 17:26:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761255#M1924</guid>
      <dc:creator>Jeffrey S. Sims</dc:creator>
      <dc:date>2002-07-10T17:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761256#M1925</link>
      <description>Dumb question that needs to be asked.  What's the IP address of the interface 'eth0' ?&lt;BR /&gt;&lt;BR /&gt;The other thing which I've found is that IPTables usually likes the '-j' flag earlier in the command line.  It does have a different effect on some rules, but if you can list the chains back, and they all look ok (iptables -nvL), then that won't be it.</description>
      <pubDate>Wed, 10 Jul 2002 21:47:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761256#M1925</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2002-07-10T21:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761257#M1926</link>
      <description>the IP is 192.168.1.253&lt;BR /&gt;&lt;BR /&gt;The iptables --list works fine and lists both rules. I am basically wanting to allow any incoming ssh request (to this machine)&lt;BR /&gt;&lt;BR /&gt;I am attempting to ssh from another machine on the 192.168.1.xx network.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Jul 2002 22:39:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761257#M1926</guid>
      <dc:creator>Jeffrey S. Sims</dc:creator>
      <dc:date>2002-07-10T22:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761258#M1927</link>
      <description>Jeffery, &lt;BR /&gt;&lt;BR /&gt;Some thoughts:&lt;BR /&gt;&lt;BR /&gt;1) I have been using shorewall as the basis of my firewall (&lt;A href="http://www.shorewall.org" target="_blank"&gt;www.shorewall.org&lt;/A&gt; or search for it on freshmeat.net) and have found it to be a superior script, and reasonably easy to configure.&lt;BR /&gt;&lt;BR /&gt;2) You verified from the /var/log/messages that the packets are indeed being dropped by the policy rule. &lt;BR /&gt;&lt;BR /&gt;3) Even if you don't use shorewall, the author operates an email list that discusses cool hacks with iptables. Could be of interest.&lt;BR /&gt;&lt;BR /&gt;hth&lt;BR /&gt;Mark</description>
      <pubDate>Thu, 11 Jul 2002 00:02:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761258#M1927</guid>
      <dc:creator>Mark Fenton</dc:creator>
      <dc:date>2002-07-11T00:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761259#M1928</link>
      <description>Have you tried logging the packets affected by each rule?  Basicly either log everything or precede each rule with an identical rule except that the target is LOG instead of ACCEPT.&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;/sbin/iptables -A INPUT -m state --state NEW -i ! eth1 -j LOG&lt;BR /&gt;/sbin/iptables -A INPUT -m state --state NEW -i ! eth1 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;It gets logged into the kern.* category, if I remember correctly (big if).  Probably need to add something like:&lt;BR /&gt;kern.* /var/log/kernel&lt;BR /&gt;&lt;BR /&gt;...to /etc/syslog.conf and restart syslog if you want to save the log messages (maybe not, don't take my word on that - test for yourself).&lt;BR /&gt;&lt;BR /&gt;If you do that, either don't leave it there permanently or go ahead and add something to logrotate's config to make sure you don't end up with /var/log/kernel growing indefinitely.  Something such as a file in /etc/lograte.d called kernel with contents such as:&lt;BR /&gt;/var/log/kernel {&lt;BR /&gt;    compress&lt;BR /&gt;    missingok&lt;BR /&gt;    notifempty&lt;BR /&gt;    daily&lt;BR /&gt;    rotate 14&lt;BR /&gt;    sharedscripts&lt;BR /&gt;    prerotate&lt;BR /&gt;        true&lt;BR /&gt;    endscript&lt;BR /&gt;    postrotate&lt;BR /&gt;        true&lt;BR /&gt;    endscript&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...which would keep at least 14 days of log files but no more than 14 files.&lt;BR /&gt;&lt;BR /&gt;Once you have the traffic logged you should be able to see source/dest info to make sure it's what you're expecting...&lt;BR /&gt;&lt;BR /&gt;Also, perhaps it's enough to specify your source networks instead of your source interface?  Depends on your situation.</description>
      <pubDate>Thu, 25 Jul 2002 14:38:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761259#M1928</guid>
      <dc:creator>Trever Furnish</dc:creator>
      <dc:date>2002-07-25T14:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761260#M1929</link>
      <description>iptables -I INPUT -j ACCEPT -i eth0 -p tcp -d 192.168.1.253 --dport 22 &lt;BR /&gt;iptables -I OUTPUT -j ACCEPT -m state --state RELAETD,ACCEPTED&lt;BR /&gt;&lt;BR /&gt;Try those two, along with some logging (as mentioned in the previous post), and see where you get.</description>
      <pubDate>Thu, 25 Jul 2002 22:47:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761260#M1929</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2002-07-25T22:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: iptables question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761261#M1930</link>
      <description>Trevor, thanks for the suggestions. Those would have worked but I had already found an answer at &lt;A href="http://www.antionline.com/showthread.php?s=&amp;amp;threadid=230338" target="_blank"&gt;http://www.antionline.com/showthread.php?s=&amp;amp;threadid=230338&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In case you haven't been there it is a great tutorial oh IPtables walking you through writing your rules.&lt;BR /&gt;&lt;BR /&gt;Thought I would pass it along</description>
      <pubDate>Fri, 26 Jul 2002 16:50:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/iptables-question/m-p/2761261#M1930</guid>
      <dc:creator>Jeffrey S. Sims</dc:creator>
      <dc:date>2002-07-26T16:50:50Z</dc:date>
    </item>
  </channel>
</rss>

