Re: [LARTC] iptables port forward

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there Tomas!

 : iptables -t nat -I PREROUTING 4 -i eth0 -d x -p tcp --dport 80 \
 :   -j DNAT --to y   when/how do i specify port 7865?

This should do the trick:

  iptables -t nat -I PREROUTING 4 -i eth0 -d $PUB_IP -p tcp --dport 80 \
     -j DNAT --to-destination $PRIV_IP:7865

Check out Oskar Andreeason's tutorial on this very matter.

  http://iptables-tutorial.frozentux.net/iptables-tutorial.html#DNATTARGET

Ciao for now,

-Martin

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@xxxxxxxxxxxxxx



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux