<?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: when to use FORWARD chain ? -- plz help in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566408#M87331</link>
    <description>nice explanation dear kcpant ;) thanx&lt;BR /&gt;&lt;BR /&gt;Thanx All&lt;BR /&gt;Regards&lt;BR /&gt;Maaz</description>
    <pubDate>Wed, 22 Jun 2005 00:07:53 GMT</pubDate>
    <dc:creator>Maaz</dc:creator>
    <dc:date>2005-06-22T00:07:53Z</dc:date>
    <item>
      <title>when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566397#M87320</link>
      <description>firewall server's external int ip: 192.1.1.254&lt;BR /&gt;firewall server's internal int ip: 10.0.0.255&lt;BR /&gt;local webservers ip: 10.1.1.1&lt;BR /&gt;&lt;BR /&gt;on firewall box:&lt;BR /&gt;cat /etc/sysctl.conf&lt;BR /&gt;net.ipv4.ip_forward = 1&lt;BR /&gt;&lt;BR /&gt;iptables -A INPUT -p tcp -d 192.1.1.254 --dport 80 -j ACCEPT&lt;BR /&gt;iptables -A INPUT -p tcp -d 192.1.1.254 -j DROP&lt;BR /&gt;&lt;BR /&gt;iptables -t nat -A PREROUTING -i eth1 -p tcp -d 192.1.1.254 --dport 80 -j DNAT --to 10.1.1.1&lt;BR /&gt;&lt;BR /&gt;where eth1 is external interface&lt;BR /&gt;&lt;BR /&gt;Firewall server is doing fine, i.e firewall server forwards the http request to local webserver.&lt;BR /&gt;&lt;BR /&gt;&lt;SNIP&gt;&lt;BR /&gt;both the INPUT and OUTPUT chains are not used for traffic which is being routed b/w 2 network intfaces on our firewall, which is left for the FORWARD chain. FORWARD chain applies to packet which are sent to our machine, but are not actually for it&lt;BR /&gt;&lt;/SNIP&gt;&lt;BR /&gt;&lt;BR /&gt;The above snippet is clear to me ... but i m not using FORWARD chain in my example/situation... and even every thing is working fine.. i.e my firewall server forwards every request on port 80 to my webserver.. and then forwards the reply back to the client&lt;BR /&gt;&lt;BR /&gt;I wana know that when to use FORWARD chain ? In my scenario should i use FORWARD chain ? plz give me example to when and how to use FORWARD chain.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Maaz&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 18 Jun 2005 13:46:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566397#M87320</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-06-18T13:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566398#M87321</link>
      <description>The policy of your FORWARD chain is probablys et to 'ACCEPT' (it is by default), which is why it's all working happily.&lt;BR /&gt;&lt;BR /&gt;Generally, it's used for DMZ's or for networks behind a Linux firewall.&lt;BR /&gt;&lt;BR /&gt;You have machines on the internal network of which get NAT'd out the external interface, the packets need to be allowed through the FORWARD chain.&lt;BR /&gt;&lt;BR /&gt;Simply put, INPUT is control over packets coming in to an interface.  OUTPUT is control over packets going out of an interface.  FORWARD is any packet passing from one interface to another.&lt;BR /&gt;&lt;BR /&gt;i.e. in from eth1, out of eth0.&lt;BR /&gt;&lt;BR /&gt;It doesn't matter that the destination is on the same machine, it's on a different interface.</description>
      <pubDate>Sat, 18 Jun 2005 14:56:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566398#M87321</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-06-18T14:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566399#M87322</link>
      <description>Forward is used to literally forward packets to some other location.&lt;BR /&gt;&lt;BR /&gt;As Stuart states it can be from NIC to NIC on the same machine.&lt;BR /&gt;&lt;BR /&gt;The following scenario is something I do so its somewhat realistic.&lt;BR /&gt;&lt;BR /&gt;Port 3389 is the Microsoft Remote Client port. On my firewall boxes, I forward that port to a Microsoft Machine so the machine can be remote managed even though it actually sits behind a firewall.&lt;BR /&gt;&lt;BR /&gt;1721 is VPN and its pretty common not to run VPN on the firewall, so you can forward that traffic to whateve machine you use as a VPN server.&lt;BR /&gt;&lt;BR /&gt;You only need to use it when you have to, and the above scenarios are good examples of when you have to.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sat, 18 Jun 2005 22:56:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566399#M87322</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-18T22:56:13Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566400#M87323</link>
      <description>ok when to use FORWARD chain is clear to me. and i m sure that on my firewall box there must be a ACCEPT rule for FORWARD chain.&lt;BR /&gt;&lt;BR /&gt;But as in my case is there any need to create a FORWARD chain, with the ACCEPT target explicitly ?&lt;BR /&gt;&lt;BR /&gt;Ok, if i create rules like:&lt;BR /&gt;iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT&lt;BR /&gt;iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT&lt;BR /&gt;i mean is there any need to create these two rules ? although FORWARD is set to ACCEPT by default.&lt;BR /&gt;&lt;BR /&gt;If i have created some INPUT/OUTPUT rules set to ACCEPT/REJECT/DROP, and some PREROUTING(DNAT), and POSTROUTING(SNAT/MASQUERADE) rules, then is there any need to create FORWARD chain(keeping in mind that FORWARD chain is set to ACCEPT by default) ?&lt;BR /&gt;&lt;BR /&gt;I m sure u people will help me, as usuall ;)&lt;BR /&gt;&lt;BR /&gt;Thanks n Regards&lt;BR /&gt;Maaz&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 19 Jun 2005 05:59:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566400#M87323</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-06-19T05:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566401#M87324</link>
      <description>If you aren't changing the policy of the forward chain, then there's no need to add specific rules:&lt;BR /&gt;&lt;BR /&gt;[root@localhost ~]# iptables -nvL FORWARD&lt;BR /&gt;Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)&lt;BR /&gt; pkts bytes target     prot opt in     out     source               destination&lt;BR /&gt;&lt;BR /&gt;As the policy is ACCEPT, no further rules are needed.  If you intend to change tha tin the future, then yes, add specific rules for your port 80 traffic, i.e.:&lt;BR /&gt;&lt;BR /&gt;iptables -A FORWARD -i eth1 -o eth0 -p tcp --dport 80 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;(and possibly:&lt;BR /&gt;&lt;BR /&gt;iptables -A FORWARD -i eth0 -o eth1 -p tcp --sport 80 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;depending on how friendly the web server is with regards to binding to IP's/Interfaces).&lt;BR /&gt;</description>
      <pubDate>Sun, 19 Jun 2005 06:09:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566401#M87324</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2005-06-19T06:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566402#M87325</link>
      <description>Thanx Dear Stuart ;)&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Maaz</description>
      <pubDate>Sun, 19 Jun 2005 23:29:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566402#M87325</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-06-19T23:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566403#M87326</link>
      <description>Hi Maaz,&lt;BR /&gt;&lt;BR /&gt;when ever you want to explicitly control traffic through any chain of any table, you first have to change the policy of that chain from ACCEPT to DROP (or REJECT, if you want), ie:&lt;BR /&gt;&lt;BR /&gt;iptables -P FORWARD DROP&lt;BR /&gt;&lt;BR /&gt;and than define the traffic you want to allow, like ,&lt;BR /&gt;&lt;BR /&gt;iptables -A FORWARD -i eth1 -p tcp -o eth0 -J ACCEPT&lt;BR /&gt;&lt;BR /&gt;and so on.&lt;BR /&gt;regards,</description>
      <pubDate>Mon, 20 Jun 2005 07:08:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566403#M87326</guid>
      <dc:creator>kcpant</dc:creator>
      <dc:date>2005-06-20T07:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566404#M87327</link>
      <description>DROP doesn't let the client know its been ignored. Its useful for stealth mode.&lt;BR /&gt;&lt;BR /&gt;ACCEPT is neccessary on the forward and other chains just to accept or in this case pass/forward the packet.&lt;BR /&gt;&lt;BR /&gt;REJECT lets the client know its been dissed and can sometimes lead the hackers to go elsewhere.&lt;BR /&gt;&lt;BR /&gt;Through long and painful experience I have learned that the default settings for all iptables firewalls should be INPUT DROP OUTPUT DROP and FORWARD DROP.&lt;BR /&gt;&lt;BR /&gt;That alone will save you a lot of grief.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 20 Jun 2005 07:19:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566404#M87327</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-20T07:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566405#M87328</link>
      <description>Thanx kcpant, and SEP.&lt;BR /&gt;&lt;BR /&gt;kcpant is it &lt;BR /&gt;iptables -P FORWARD DROP&lt;BR /&gt;or &lt;BR /&gt;iptables -P FORWARD -j DROP&lt;BR /&gt;&lt;BR /&gt;and one more thing u used '-P' instead '-A' or '-I', so whats -P for ? I mean whats -P does ?&lt;BR /&gt;&lt;BR /&gt;Thanks n Regards&lt;BR /&gt;Maaz</description>
      <pubDate>Mon, 20 Jun 2005 14:13:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566405#M87328</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-06-20T14:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566406#M87329</link>
      <description>iptables [-t table] -P chain target [options]&lt;BR /&gt;&lt;BR /&gt;Thats from the man page.&lt;BR /&gt;&lt;BR /&gt;A chain target allows you to set up a keyword or shortname for a particular, linked set of rules. Just a device to help you out.&lt;BR /&gt;&lt;BR /&gt;The DROP command must be accompanied by the -j&lt;BR /&gt;&lt;BR /&gt;iptables &lt;COMMAND options=""&gt; -j DROP&lt;BR /&gt;&lt;BR /&gt;Same for ACCEPT and REJECT&lt;BR /&gt;&lt;BR /&gt;The -j is mandatory in my experience.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;/COMMAND&gt;</description>
      <pubDate>Mon, 20 Jun 2005 17:06:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566406#M87329</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-20T17:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566407#M87330</link>
      <description>Hi Maaz,&lt;BR /&gt;&lt;BR /&gt;When you are going to define a policy for a chain, you don't have to use target (-j) keyword, instead, you have to use:&lt;BR /&gt; iptables &lt;CHAIN name=""&gt; -P &lt;DROP&gt; &lt;BR /&gt;&lt;BR /&gt;This "-P" switch defines that it is a policy option, and it is applicable to the whole chain.&lt;BR /&gt;&lt;BR /&gt;(SEP, you are very senior to us, but, as I know, -j switch is not used in defining policies, only -P is used. please guide us if I'm incorrect)&lt;/DROP&gt;&lt;/CHAIN&gt;</description>
      <pubDate>Mon, 20 Jun 2005 23:23:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566407#M87330</guid>
      <dc:creator>kcpant</dc:creator>
      <dc:date>2005-06-20T23:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566408#M87331</link>
      <description>nice explanation dear kcpant ;) thanx&lt;BR /&gt;&lt;BR /&gt;Thanx All&lt;BR /&gt;Regards&lt;BR /&gt;Maaz</description>
      <pubDate>Wed, 22 Jun 2005 00:07:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566408#M87331</guid>
      <dc:creator>Maaz</dc:creator>
      <dc:date>2005-06-22T00:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: when to use FORWARD chain ? -- plz help</title>
      <link>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566409#M87332</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;On a side note, I presume you have more to your firewall than the 2 lines on eth1, because if I send a packet destined for the internal 10/8 network your firewall is going to let it through! because your default FORWARD is ACCEPT&lt;BR /&gt;&lt;BR /&gt;Alex</description>
      <pubDate>Wed, 22 Jun 2005 18:39:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/when-to-use-forward-chain-plz-help/m-p/3566409#M87332</guid>
      <dc:creator>Alexander Samad</dc:creator>
      <dc:date>2005-06-22T18:39:30Z</dc:date>
    </item>
  </channel>
</rss>

