Most VPS providers default to TUN/TAP devices that are not configured for VPS and need to apply for open Tun/tap. How to verify that the OpenVZ VPS Tun/tap device has been correctly? Test with the following command:
The code is as follows |
Copy Code |
#cat/dev/net/tun
|
If the command returns information as:
Cat:/dev/net/tun:file Descriptor in
Congratulations, your VPS Tun/tap already available.
If the command returns information as:
Cat:/dev/net/tun:no Such device
or otherwise, the TUN/TAP device is not configured properly.
It is also a reminder to use VPN routing to configure NAT in the VPS, such as the following command:
The code is as follows |
Copy Code |
# iptables-t nat-a postrouting-s 10.8.0.0/24-o venet0-j Masquerade
|
If you return an error, for example:
Iptables V1.4.3.2:can ' t initialize iptables table ' NAT ': Table does not exist (does you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.
So that your machine change does not allow you to set up in the VPS Nat, contact service providers to open the VPS Nat.