Hello all,
I've got a linux route running iptables. i thought i had it functioning correctly, forwarding the necessary ports for http, ssh and ftp to another box. Evidently my website isn't accessible (neither are any of these other services). I'm not sure whats hanging up the connection in iptables. Below is the commands i pass to iptables to enable port forwarding and forward the ports. I would appreciate it greatly if someone could point out my mistake:
Code:
IPTABLES=/sbin/iptables
ROOTERLAN=eth0
ROOTERWAN=eth1
VEGALANIP=10.6.1.10
ROOTERLANIP=10.6.1.1
LANNET=10.6.1.0/24
...flush tables and set policies...
$IPTABLES -A INPUT -p tcp --dport http -i $ROOTERWAN -j ACCEPT
$IPTABLES -A POSTROUTING -t nat -s $LANNET -o $ROOTERWAN -j MASQUERADE
$IPTABLES -A FORWARD -i $ROOTERWAN -j ACCEPT
$IPTABLES -A FORWARD -p tcp -s $VEGALANIP -i $ROOTERLAN -o $ROOTERWAN -j ACCEPT
#forward http
$IPTABLES -A PREROUTING -t nat -i $ROOTERWAN -p tcp --dport 80 -j DNAT --to $VEGALANIP:80
$IPTABLES -A FORWARD -p tcp --dport 80 -i $ROOTERWAN -d $VEGALANIP -j ACCEPT
Thanks in advance.