OpenVZ Forum


Home » General » Support » NAT Poblems on HOST Computer
NAT Poblems on HOST Computer [message #4572] Fri, 14 July 2006 17:10 Go to next message
foxxfiles is currently offline  foxxfiles
Messages: 12
Registered: July 2006
Junior Member
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
Re: NAT Poblems on HOST Computer [message #4582 is a reply to message #4572] Sat, 15 July 2006 11:00 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

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


http://static.openvz.org/userbars/openvz-developer.png
Re: NAT Poblems on HOST Computer [message #4603 is a reply to message #4582] Mon, 17 July 2006 18:45 Go to previous messageGo to next message
foxxfiles is currently offline  foxxfiles
Messages: 12
Registered: July 2006
Junior Member
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
Re: NAT Poblems on HOST Computer [message #4608 is a reply to message #4603] Tue, 18 July 2006 04:06 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

have you reboot you computer after that?


http://static.openvz.org/userbars/openvz-developer.png
Re: NAT Poblems on HOST Computer [message #4611 is a reply to message #4603] Tue, 18 July 2006 07:08 Go to previous message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
# 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)



http://static.openvz.org/openvz_userbar_en.gif
Previous Topic: Gentoo Kernel Problems (2.6.8-openvz-022.077) Panics Immediately - "kernel too old"
Next Topic: *SOLVED* - remove veth interfaces
Goto Forum:
  


Current Time: Fri May 10 02:25:13 GMT 2024

Total time taken to generate the page: 0.01505 seconds