iptables and NAT
Jeff
jdyke at azimapower.com
Sat Feb 5 22:46:56 UTC 2005
Jeff wrote:
> So far i've
> echo 1 > /proc/sys/net/ipv4/ip_forward
> to enable forwarding and restarted iptables, and saw
> Setting chains to policy ACCEPT: nat filter [OK] - when i restarted.
>
> From some web searching and man iptables i deceided to try the following:
>
> iptables -t nat -A PREROUTING -p tcp -s 192.168.2.81 --source-port
> 3306 -d 192.168.2.81 --destination-port 3307 -j DNAT --to-destination
> 192.168.2.81
>
> Of course i've done something wrong, as i don't see this entry using
> iptables -L
>
Sorry to respond to my own post, but the rule is added. i can see
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DNAT tcp -- 192.168.2.81 192.168.2.81 tcp spt:3306
dpt:3307 to:192.168.2.81
when i run
iptables -L -n -t nat
but can not connect to the mysql server by specifying --port 3306.
back to google....maybe i'll even go buy the orielly book.
thanks
jd
More information about the Redhat-install-list
mailing list