How to confirm that the TUN/TAP device in the OpenVZ VPS has been properly configured

Source: Internet
Author: User
Tags vps iptables vps providers

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.