Pls try beow lines
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -i eth0 -d externalipaddress --dport 80 -j DNAT --to-destination 192.168.20.1:80
iptables -A FORWARD -p tcp -d 192.168.20.1 --dport 80 -m state --state NEW -j ACCEPT
On Tue, Mar 29, 2011 at 2:36 PM, admin lewis <adminlewis@xxxxxxxxx> wrote:
Hi,
does anyone remember the rules for port forwarding ?
the followings does not work:
iptables -A FORWARD -i eth0 -o eth1 -p tcp –dport 80 -j ACCEPT
iptables -A PREROUTING -t nat -p tcp -i eth0 –dport 80 -j DNAT –to
192.168.20.1:80
thx lewis
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos
--
Thank you
Indunil Jayasooriya
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos