Install Script for OpenVZ VPS - CENTOS / DEBIAN / UBUNTU
CENTOS: http://bluemodule.com/
Download Link:
http://bluemodule.com/wp-content/plugins/wp-codebox/wp-codebox.php?p=202&download=ovpn_install_script.sh
DEBIAN / UBUNTU:
http://www.putdispenserhere.com/2011/openvpn-debianubuntu-setup-script-for-openvz/
Download Link:
http://www.putdispenserhere.com/wp-content/uploads/openvpninstall.sh
After running the above scripts surfing/browsing to google.com or other sites will not allow you.
You have to execute the below commands on the VPS
#ifconfig -a | grep P-t-P
inet addr:10.9.0.1 P-t-P:10.9.0.2 Mask:255.255.255.255
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
inet addr:8X.8X.2XX.XX P-t-P:8X.8X.2XX.XX Bcast:8X.8X.2XX.XX Mask:255.255.255.255
Note: P-t-P:10.9.0.2 - For tun0
#iptables -t nat -A POSTROUTING -s 10.9.0.0/32 -o eth0 -j MASQUERADE
#/etc/init.d/iptables save
#/etc/init.d/iptables restart
or
#iptables -A POSTROUTING --table nat -o eth0 -j MASQUERADE
#/etc/init.d/iptables save
#/etc/init.d/iptables restart
Note: Please make sure to enable the TUN / TAP / PPPD / IPTABLES on your VPS
2 comments:
My version of Debian seems not to include TUN / TAP driver , how could I add this module to the kernel?
You have to contact the VPS provider to enable the TUN/TAP module...
Post a Comment