From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Craig Subject: Re: Port forwarding Date: Fri, 06 Jun 2003 18:15:10 +1000 Sender: netfilter-admin@lists.netfilter.org Message-ID: <3EE04D8E.7040306@snapgear.com> References: <012501c32b47$abfd4340$0223a8c0@satconet.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <012501c32b47$abfd4340$0223a8c0@satconet.com> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Dhyanesh Ramaiya Cc: netfilter@lists.netfilter.org Dhyanesh Ramaiya wrote: > iptables -t nat -A PREROUTING -j DNAT -p tcp -d --dport 110 --to > :110 > iptables -t nat -A PREROUTING -j DNAT -p tcp -d --dport 25 --to > :25 > > What happens, is that when I try to telnet port 25 or 110 from the router > itself, it doesn't connect and gives the error "Connection refused". > However, from any other machine on the network it connects. Thinking that > some firewall rules might be blocking the connection, the default policy of > all chains is set to accept. Packets from the router itself do not go through the PREROUTING chain, so they aren't being NATed. You'll need to add similar NAT rules in the OUTPUT chain. -- Philip Craig - philipc@snapgear.com - http://www.SnapGear.com SnapGear - Custom Embedded Solutions and Security Appliances