<?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: Need ipchains help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684327#M89944</link>
    <description>Here is an example where mail (SMTP) packets arriving at external.example.com get forwarded to internal.example.com:&lt;BR /&gt;&lt;BR /&gt;ipmasqadm portfw -a -P tcp -L external.example.com smtp -R internal.example.com smtp&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
    <pubDate>Fri, 15 Mar 2002 17:44:54 GMT</pubDate>
    <dc:creator>Scott Nelson_1</dc:creator>
    <dc:date>2002-03-15T17:44:54Z</dc:date>
    <item>
      <title>Need ipchains help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684326#M89943</link>
      <description>I'm trying to use a RedHat 7.2 box with ipchains to accomplish two things:&lt;BR /&gt;&lt;BR /&gt;1 - Act as a firewall in general to deny inbound access to all but very specific services.&lt;BR /&gt;&lt;BR /&gt;2 - Allow me to forward connection attempts to specific services (http, for instance) to a different machine sitting behind the Linux box's second interface.&lt;BR /&gt;&lt;BR /&gt;I have tried all kinds of different ipchains commands with no luck.  Can someone help me with the specific syntax of how to accomplish port forwarding with ipchains?&lt;BR /&gt;&lt;BR /&gt;And yes, I've read the ipchains howto, etc., but can't find specific examples of how to get the port forwarding pieces working correctly.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 15 Mar 2002 16:28:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684326#M89943</guid>
      <dc:creator>Steve Nold</dc:creator>
      <dc:date>2002-03-15T16:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Need ipchains help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684327#M89944</link>
      <description>Here is an example where mail (SMTP) packets arriving at external.example.com get forwarded to internal.example.com:&lt;BR /&gt;&lt;BR /&gt;ipmasqadm portfw -a -P tcp -L external.example.com smtp -R internal.example.com smtp&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Fri, 15 Mar 2002 17:44:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684327#M89944</guid>
      <dc:creator>Scott Nelson_1</dc:creator>
      <dc:date>2002-03-15T17:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need ipchains help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684328#M89945</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;First you would want to define your default policy and judging from your post I would think you wanted to deny everything unless you specifically allow it. You would do this by editing the file /etc/rc.d/rc.firewall and putting the following lines at the top.&lt;BR /&gt;&lt;BR /&gt;####Set default policy to deny ####&lt;BR /&gt;ipchains -P input DENY&lt;BR /&gt;ipchains -P output REJECT&lt;BR /&gt;ipchains -P forward REJECT&lt;BR /&gt;&lt;BR /&gt;Now all your network traffic is blocked and you have to decide what you want to enable.&lt;BR /&gt;&lt;BR /&gt;You may want to create some variables in this file to eliminate having to type numbers repeatedly. Some examples would be:&lt;BR /&gt;&lt;BR /&gt;EXTERNAL_INTERFACE="eth0"&lt;BR /&gt;LOOPBACK_INTERFACE="lo"&lt;BR /&gt;&lt;BR /&gt;IPADDR="your.ip.address"&lt;BR /&gt;ANYWHERE="any/0" #match any IP address&lt;BR /&gt;PRIVPORTS="0:1023"&lt;BR /&gt;UNPRIVPORTS="1024:65535"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Anyway, after you have all the variables you need or want then you can start enabling what you want to let through.&lt;BR /&gt;&lt;BR /&gt;To allow you to run any local network service you choose you have to enable unrestricted loopback traffic. Do this by entering&lt;BR /&gt;&lt;BR /&gt;ipchains -A input -i $LOOPBACK_INTERFACE -j ACCEPT&lt;BR /&gt;ipchains -A output -i $LOOPBACK_INTERFACE -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;Now you need to accept traffic for the services that you want to offer. To receive mail sent to this machine from an external address you would use:&lt;BR /&gt;&lt;BR /&gt;ipchains -A input -i $EXTERNAL_INTERFACE -p tcp -s $ANYWHERE $UNPRIVPORTS -d $IPADDR 25 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;Ok well this should at least get you going and let you see the syntax for the ipchains commands that you will be using. Check out a book called Linux Firewalls by Robert L. Ziegler ISBN 0-7357-0900-9&lt;BR /&gt;&lt;BR /&gt;Have fun and hope this helps</description>
      <pubDate>Fri, 15 Mar 2002 18:01:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684328#M89945</guid>
      <dc:creator>Jeffrey S. Sims</dc:creator>
      <dc:date>2002-03-15T18:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Need ipchains help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684329#M89946</link>
      <description>Steve -- I don't think ipchains will be a very satisfying solution for your port redirection issues (though ipmasqadm will handle it OK). &lt;BR /&gt;&lt;BR /&gt;Since you are using RH 7.2, why not try iptables instead? One tool that can accomplish the entire firewalling setup. &lt;BR /&gt;&lt;BR /&gt;Jefferey's setup for ipchains is a great start, and most of that would be applicable to an iptables configuration as well. &lt;BR /&gt;&lt;BR /&gt;There are several iptables firewall builders available (check out &lt;A href="http://freshmeat.net" target="_blank"&gt;http://freshmeat.net&lt;/A&gt; and search on iptables firewall). I'm kind of partial to shorewall, though it is somewhat more difficult to make jump through hoops than some others I've worked with.&lt;BR /&gt;&lt;BR /&gt;If you are still having trouble with specific NAT issues, please to post a more detailed description of what it is that's not working.&lt;BR /&gt;&lt;BR /&gt;Best regards.&lt;BR /&gt;Mark</description>
      <pubDate>Sat, 16 Mar 2002 02:56:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684329#M89946</guid>
      <dc:creator>Mark Fenton</dc:creator>
      <dc:date>2002-03-16T02:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need ipchains help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684330#M89947</link>
      <description>Thanks for all the responses.  After spending some time with it over the weekend, I've decided to bite the bullet and dive into iptables, since it seems to be more robust that ipchains.&lt;BR /&gt;&lt;BR /&gt;Thanks again, everyone.</description>
      <pubDate>Mon, 18 Mar 2002 19:19:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-ipchains-help/m-p/2684330#M89947</guid>
      <dc:creator>Steve Nold</dc:creator>
      <dc:date>2002-03-18T19:19:22Z</dc:date>
    </item>
  </channel>
</rss>

