OpenVZ Forum


Home » General » Support » enable /dev/net/tun and iptable_nat
enable /dev/net/tun and iptable_nat [message #36517] Sun, 28 June 2009 23:38 Go to next message
tesna is currently offline  tesna
Messages: 2
Registered: June 2009
Junior Member
Hi everyone,

I'm currently have three unmanaged VPS on three different providers and two of then already had /dev/net/tun and iptable_nat enabled on my vps.

I asked all of them to enable these two on my vps and only two of them managed to do it. The other one tried to enable it but in the end the technical support just said they are unmanaged VPS provider and I should look on this forum on how to enable both of them on my VPS. I use /dev/net/tun and iptable_nat to use OpenVPN on my VPS and OpenVPN has been setup sucessfully on two other VPS.

Here is the log file of openvpn:
Mon Jun 29 02:22:42 2009 us=575678 Note: Cannot open TUN/TAP dev /dev/net/tun: Permission denied (errno=13)
Mon Jun 29 02:22:42 2009 us=575691 Note: Attempting fallback to kernel 2.2 TUN/TAP interface
Mon Jun 29 02:22:42 2009 us=576485 Cannot allocate TUN/TAP dev dynamically
Mon Jun 29 02:22:42 2009 us=576498 Exiting

and here's why I need to enable iptable_nat
[root@juno openvpn]# iptables -t nat -s 10.8.0.0/24 -A POSTROUTING -j SNAT --to XX.XX.XX.XX (IP ADDRESS REMOVED)
iptables v1.3.5: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.


The question, is it possible to do it from my end? if so, how? or I need to them do do it? if so please explain how to do it and I will forward this message to their technical support.



Any help will be much appreciated Smile



Re: enable /dev/net/tun and iptable_nat [message #36525 is a reply to message #36517] Mon, 29 June 2009 07:32 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hello,

1. you can create a character device from inside the container but it's necessary to allow your VE to use it which must be made from the HN.
http://wiki.openvz.org/VPN_via_the_TUN/TAP_device

2. Please read user's guide
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf
"Loading iptables modules - page 69"
Re: enable /dev/net/tun and iptable_nat [message #36526 is a reply to message #36517] Mon, 29 June 2009 07:48 Go to previous message
tesna is currently offline  tesna
Messages: 2
Registered: June 2009
Junior Member
Whoa, its clearly documented in the User Guide! Thank you very much maratus! I'll send the link to the my provider's technical support. I wonder why my VPS provider took soooo damn long to do this Sad Its been 48 hours since I first opened the ticket Surprised
Previous Topic: VLAN packets not going through
Next Topic: Accessing the HN thermal modules from the Container
Goto Forum:
  


Current Time: Fri Nov 08 23:02:12 GMT 2024

Total time taken to generate the page: 0.03209 seconds