<br><br><br>Pls try beow lines<br><br>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br>iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT<br>iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT<br>
<br><br>echo "1" > /proc/sys/net/ipv4/ip_forward<br><br>iptables -t nat -A PREROUTING -p tcp -i eth0 -d externalipaddress --dport 80 -j DNAT --to-destination <a href="http://192.168.20.1:80">192.168.20.1:80</a><br>
<br>iptables -A FORWARD -p tcp -d 192.168.20.1 --dport 80 -m state --state NEW -j ACCEPT <br><br><br><br><br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 2:36 PM, admin lewis <span dir="ltr"><<a href="mailto:adminlewis@gmail.com">adminlewis@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
does anyone remember the rules for port forwarding ?<br>
the followings does not work:<br>
iptables -A FORWARD -i eth0 -o eth1 -p tcp –dport 80 -j ACCEPT<br>
iptables -A PREROUTING -t nat -p tcp -i eth0 –dport 80 -j DNAT –to<br>
<a href="http://192.168.20.1:80" target="_blank">192.168.20.1:80</a><br>
<br>
thx lewis<br>
_______________________________________________<br>
CentOS mailing list<br>
<a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Thank you<br>Indunil Jayasooriya<br><br>