[plug] routing packets problem
Jon Miller
jlmiller at mmtnetworks.com.au
Tue Aug 12 09:40:05 WST 2003
I'm trying to route packets from 2 locations to a MySQL server sitting
behind a firewall running iptables. The MySQL server has a ip address
of 192.168.1.12.
Basically I want packets destined to port 3306 to be forwarded or
redirected to 192.168.1.12.
# MySQL
/sbin/iptables -A PREROUTING -t nat -i ppp0 -p tcp --dport 3306 -j DNAT
--to-destination 192.168.1.12
iptables -A INPUT -p tcp --dport mysql -j ACCEPT
iptables -A FORWARD -p tcp -s 192.168.1.12 --sport mysql -j ACCEPT
iptables -A FORWARD -p tcp -s $PRIVIP_1 --dport mysql -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -p tcp -s $PRIVIP_2 --dport mysql -j ACCEPT
Thanks
--
Jon Miller <jlmiller at mmtnetworks.com.au>
MMT Networks Pty Ltd
More information about the plug
mailing list