hi Using 2.6.8-022stab078-smp I have problems using iptables nat on host computer with the ovz kernel. Iam triying use static NAT one-to-one, from a ip placed on eth1 to a secondary ip on venet0 placed on eth0 but not work on ovz host machine, the iptables rules work on others machines with generic kernel. 192.168.153.252 --- eth1:0 Host Computer IP 192.168.100.153 --- venet0:1 VPS Secondary IP Rules iptables -t nat -A OUTPUT -d 192.168.153.252 -j DNAT --to-destination 192.168.100.153 iptables -t nat -A PREROUTING -d 192.168.153.252 -j DNAT --to-destination 192.168.100.153 I need made NAT from 192.168.153.252 to 192.168.100.153 Note: On other generic Kernels this rules work, but on the vz kernel not work. any IDEA? Fernando Alberto Velasquez
check the last entry in FAQ: on 2.6.8 kernels you need to enabled conntracks in host system which are disabled by default. http://openvz.org/documentation/faq also check wiki page about NAT if needed: http://wiki.openvz.org/Using_NAT_for_VE_with_private_IPs
iam read http://wiki.openvz.org/Using_NAT_for_VE_with_private_IPs and placed on modules.conf thisa line options ip_conntrack ip_conntrack_enable_ve0=1 But Not Work Any IDEA.? Fernando
have you reboot you computer after that?
# service vz stop # service iptables stop # lsmod | grep ip_conntrack (check that unloaded) # modprobe ip_conntrack ip_conntrack_enable_ve0=1 # cat /proc/net/ip_conntrack (if exists, conntracks are loaded properly)