*SOLVED* NAT/MASQUERADING inside VZ [message #4852] |
Sat, 29 July 2006 09:19 |
|
Hi,
I've successfuly created OpenVPN connection to VZ using tun interface. Now I need to do NAT inside VZ but I wasn't able to set-up rule for iptables:
zone1:~# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
FATAL: Could not load /lib/modules/2.6.16-026test014/modules.dep: No such file or directory
iptables v1.3.3: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Module ipt_MASQUERADE is loaded on host computer.
Same problem is with SNAT:
zone1:~# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source x.x.x.x
FATAL: Could not load /lib/modules/2.6.16-026test014/modules.dep: No such file or directory
iptables v1.3.3: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
zone1:~# iptables -t nat -L
FATAL: Could not load /lib/modules/2.6.16-026test014/modules.dep: No such file or directory
iptables v1.3.3: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Do I need to enable something for VZ like when using NAT on host computer? Is it possible to do NAT inside VZ?
Thanks,
Jan
[Updated on: Mon, 31 July 2006 05:28] by Moderator Report message to a moderator
|
|
|
|
Re: NAT/MASQUERADING inside VZ [message #4860 is a reply to message #4855] |
Sat, 29 July 2006 21:26 |
|
vass wrote on Sat, 29 July 2006 15:53 | What about IPTABLES parameter in your /etc/vz/vz.conf?
|
I totally forgot this. I've added iptable_nat parameter and everything is working fine, now.
Thanks for hint.
Jan
|
|
|
Re: *SOLVED* NAT/MASQUERADING inside VZ [message #23856 is a reply to message #4852] |
Wed, 28 November 2007 07:41 |
doublet
Messages: 6 Registered: November 2007
|
Junior Member |
|
|
Hi,I have same problem but there's no /etc/vz/vz.conf, no idea about where could it be.
Anyway, I'm using a provider VPS, so i don't know if problem is in node on inside my VPS.
Any idea?
[root@swol~]# iptables -t nat -A PREROUTING -p tcp -d 10.20.30.40 --dport 40 -j DNAT --to-destination 10.20.30.50:70
iptables v1.2.11: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
[root@swol~]# iptables -L -t nat
iptables v1.2.11: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Thanks in advance =)
[Updated on: Wed, 28 November 2007 07:45] Report message to a moderator
|
|
|
|
|
Re: *SOLVED* NAT/MASQUERADING inside VZ [message #44154 is a reply to message #4852] |
Tue, 22 November 2011 06:54 |
Rene
Messages: 40 Registered: September 2006
|
Member |
|
|
Plnt wrote on Sat, 29 July 2006 05:19Hi,
Module ipt_MASQUERADE is loaded on host computer.
How do you load ipt_MASQUERADE on the host computer, pray tell?
Quote:
# insmod ipt_MASQUERADE
insmod: can't read 'ipt_MASQUERADE': No such file or directory
|
|
|