Hello Guys,

I got trouble to get vserver work as gate:

GATE=XX.XX.XX.XX

YY_PORT=YY

echo "1" > /proc/sys/net/ipv4/ip_forward

iptables -F -t nat

iptables -t nat -A PREROUTING -p tcp -i venet0:0 --dport $YY_PORT \
       -j DNAT --to-destination $GATE:$YY_PORT

iptables -t nat -A POSTROUTING -p tcp --dport $YY_PORT \
       -j MASQUERADE


iptables -L -t nat


Any suggestion? I got it in the past, but now I'm completely confused.

Thanks for help.

Sincerely

Andy


_______________________________________________
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos

Reply via email to