From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Pemberton Subject: Re: Port forwarding fun (was NATing on a single interface?) Date: Fri, 27 Oct 2006 21:26:11 +0100 Message-ID: References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-bounces@lists.netfilter.org Errors-To: netfilter-bounces@lists.netfilter.org Content-Type: text/plain; charset="us-ascii"; format="flowed" To: netfilter@lists.netfilter.org > # Forward some ports > echo "Forwarding port 99 to 10.0.0.8:80" > $IPT -t nat -A PREROUTING -p tcp -m tcp --dport 99 -j DNAT > --to-destination 10.0.0.8:80 Oh $CURSE. Forgot the FORWARD rule: $IPT -A FORWARD -p tcp -d 10.0.0.8 --dport 80 -j ACCEPT Now it works, and I'm a happy bunny once more. I would appreciate some constructive criticism relating to my iptables script though - possible security/style improvements, etc. Spotted that on . Found on the second page of results from a Google search for 'iptables DNAT port-forward'. Thanks. -- Phil. | (\_/) This is Bunny. Copy and paste Bunny usenet06@philpem.me.uk | (='.'=) into your signature to help him gain http://www.philpem.me.uk/ | (")_(") world domination. If mail bounces, replace "06" with the last two digits of the current year.