Sorry to dissapoint you, but on vserver even bringing up OpenVPN, you cant use it to redirect client internet traffic thru OpenVPN server. As stated here
http://linux-vserver.org/Frequently_Ask ... tables_.3F
Can I use iptables ?
Yes but right now only on the host (rootserver). Please realize that all traffic is local and will not touch the forward chain.
If you really, really, really need iptables on the guest and you are aware about loosing a big part of VServer isolation and security you could add the NET_ADMIN capability. Consider writing wrappers to manage iptables on the host instead.
Althought it may be possible using that net_admin as the stated, but I'm not sure, must be tested what that net_admin is.
Are you using WIndows 7? You have to run OpenVPN as administrator and as elevated user, i.e. right click -> run as administrator.
Also in server.conf you must use:
Code: Select all
server 10.0.1.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 10.0.1.1"
Its good that you use in server.conf:
Because OpenVPN cant set tun interface parameters.
Also you already done this:
Code: Select all
# ip link set dev tun1280-76 txqueuelen 100
# ifconfig tun1280-76 10.0.1.1 pointopoint 10.0.1.2 mtu 1500
# route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.1.2
To enable NET_ADMIN may be this must be done:
Code: Select all
>echo "NET_ADMIN" >> /etc/vservers/<your vserver name>/bcapabilities
This may not work so you will have to ask admin stuff for this.
Well may be they pre-configured your tun interface with ip 10.0.1.33 so using
is good, and the ip pool will be 33-34 - enoth to connect one client.
Talk to vserver admin stuff about masquarading. Without it, client cant use VPS internet conenction to access internet.