[ale] iptables port forwarding
Jim Popovitch
jimpop at yahoo.com
Sun Apr 1 23:20:13 EDT 2007
I'm brain dead tonight, at least when dealing with iptables. ;-) What
I'm trying to do is forward a port from inside a vpn to an outside host.
Specifically I want internal users to use 192.168.10.1:25 for submitting
email to a remote host (ww.xx.yy.zz). On the gateway server
(192.168.10.1), tap0 is the openvpn interface and eth0 is the external
interface and I'm using these rules:
iptables -t nat -A PREROUTING -p tcp -i tap0 -d 192.168.10.1
--dport 25 -j DNAT --to ww.xx.yy.zz:80
iptables -A FORWARD -p tcp -i tap0 -o eth0 -d 192.168.10.1 --dport 25 -j ACCEPT
The problem is that telnet'ing to 192.168.10.1 port 25 doesn't work. Any ideas?
-Jim P.
More information about the Ale
mailing list