Mengaktifkan tun device in openvz

Untuk menaktifkan tun di openvz berikut ini caranya

pastikan kamu tau vps id kamu, saya pakai 110 sebagai contoh

VPSID=110

1. login ke mesin openvz kamu.

2. cek apakah tun module sudah di load ke node kamu

# lsmod | grep tun

3. kalo nga muncul coba pakai perintah dibawah ini untuk load tun kamu

# modprobe tun

4. cek apakah tun kamu sudah ada atau blum di openvz kamu

# lsmod | grep tun

if all ok then you can use

# vzctl set 110 --devnodes net/tun:rw --save
# vzctl set 110 --devices c:10:200:rw --save
# vzctl stop 110
# vzctl set 110 --capability net_admin:on --save
# vzctl start 110
# vzctl exec 110 mkdir -p /dev/net
# vzctl exec 110 chmod 600 /dev/net/tun

5. cek apakah tun kamu sudah muncul

To check TUN/TAP is enabled or not :

[root@google.com /]# vzctl enter 110

Inside the VPS:

[root@vps101 /]# cat /dev/net/tun

cat: /dev/net/tun: File descriptor in bad state # It means the TUN/TAP is enabled on your VPS.

cat: /dev/net/tun: No such device # If you receive like this, then the TUN/TAP has not enabled on your VPS . Try to enable TUN/TAP again and check.

selamat mencoba

Source: http://wiki.openvz.org/VPN_via_the_TUN/TAP_device

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s