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

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
makulit
OpenVpn Newbie
Posts: 10
Joined: Wed Sep 07, 2011 4:51 pm

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

Post by makulit » Sat Sep 10, 2011 7:26 pm

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 :)

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

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

Post by janjust » Sat Sep 10, 2011 9:46 pm

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.

makulit
OpenVpn Newbie
Posts: 10
Joined: Wed Sep 07, 2011 4:51 pm

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

Post by makulit » Sat Sep 10, 2011 10:05 pm

wow thank you for your reply.... i will try :D

makulit
OpenVpn Newbie
Posts: 10
Joined: Wed Sep 07, 2011 4:51 pm

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

Post by makulit » Sun Sep 11, 2011 2:02 pm

they say eth0 interface is not available inside VPS server.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

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

Post by janjust » Sun Sep 11, 2011 8:48 pm

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.

Dalay
OpenVpn Newbie
Posts: 8
Joined: Tue Aug 02, 2011 6:52 pm

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

Post by Dalay » Sat Sep 24, 2011 9:09 pm

its usually venet0

makulit
OpenVpn Newbie
Posts: 10
Joined: Wed Sep 07, 2011 4:51 pm

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

Post by makulit » Sun Oct 09, 2011 8:34 pm

any guide? help please thank you very much...im a noob :D

jeffmonte
OpenVpn Newbie
Posts: 3
Joined: Fri Nov 25, 2011 4:49 am

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

Post by jeffmonte » Fri Nov 25, 2011 4:50 am

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.

Post Reply