Page 1 of 1

Help PLease....connected but can't browse

Posted: Sat Sep 10, 2011 7:26 pm
by makulit
My VPS server centos 5.6 :)

server conf

local -------
port 9200
proto udp
dev tun
tun-mtu 2000
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login
client-cert-not-required
username-as-common-name
server 10.10.0.0 255.255.0.0
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
comp-lzo
persist-key
persist-tun
verb 3
float
duplicate-cn
keepalive 10 120

Client config

client
dev tun
proto udp
remote ------
lport 80
resolv-retry infinite
bind
tun-mtu 2000
persist-key
persist-tun
comp-lzo
mute 3
reneg-sec 0
route-method exe
keepalive 10 120
ca ca.crt
auth-user-pass password.txt

My VPS server centos 5.6 :)

Re: Help PLease....connected but can't browse

Posted: Sat Sep 10, 2011 9:46 pm
by janjust
setting
tun-mtu 2000
is not going to do you a lot of good - try it without this setting.

also, if you can ping the VPN IP of the VPS server then your VPN is functional - everything after that is routing; make sure IP forwarding is enabled on the VPS server and make sure that masquerading is allowed:

Code: Select all

echo 1 > /proc/sys/net/ipv4/ip_foward
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
You might have to talk to your VPS container provider to allow masquerading.

Re: Help PLease....connected but can't browse

Posted: Sat Sep 10, 2011 10:05 pm
by makulit
wow thank you for your reply.... i will try :D

Re: Help PLease....connected but can't browse

Posted: Sun Sep 11, 2011 2:02 pm
by makulit
they say eth0 interface is not available inside VPS server.

Re: Help PLease....connected but can't browse

Posted: Sun Sep 11, 2011 8:48 pm
by janjust
what is the outgoing interface on your VPS box? do '/sbin/ifconfig -a' and find the interface with your (public?) IP address. Change the masquerading rule to use this interface.

Re: Help PLease....connected but can't browse

Posted: Sat Sep 24, 2011 9:09 pm
by Dalay
its usually venet0

Re: Help PLease....connected but can't browse

Posted: Sun Oct 09, 2011 8:34 pm
by makulit
any guide? help please thank you very much...im a noob :D

Re: Help PLease....connected but can't browse

Posted: Fri Nov 25, 2011 4:50 am
by jeffmonte
Please try adding the iptables rule with venet0 interface rather than eth0.

iptables -t nat -I POSTROUTING -o venet0 -j MASQUERADE

This will help routing the traffic out of the server. Let me know how that goes.