If you’re using an OpenVPN Server to surf in Ubuntu, maybe you experienced this strange problem : you can connect but you cannot surf
! This how to fix it...

Before we start check your current IP online and save it.
The first thing you have to know is that you shouldn’t use NetworkManager Applet to configure your OpenVPN Connexion, it seems that there’s a problem with vpn connections when using this applet (atleast with Intrepid), you can connect but traffic isn’t redirected correctly, so let’s first make sure you’re correctly connected ! The best thing to do is to download the configuration files from the OpenVPN Server’s website (just look in the forum if you don’t find it, it’s generally an archive file with a *.conf file and a *.crt file, this last one is the certificate) and use’em directly in a shell console.
Copy the archive content files to
/etc/openvpn/
Type :
cd /etc/openvpn && sudo openvpn yourserver.conf
Enter your login and password and wait till you see :
Initialization Sequence Completed
It means that you’re in.
Now to make sure that you’re not facing a routing problem, just type :
route -n
If you see tunX connections with new IPs, it’s OK you’re connected, if one of your web connected peripheral connections (ethX, athX…) is showing the IP of your OpenVPN Server as a destination you’re correctly routed.
Now try to ping the tunX IP with a gateway, if you’ve got this message :
ping: sendmsg: Operation not permitted
You got the fix ! It’s a SIMPLE FIREWALL PROBLEM
!
To solve it, you have to edit :
/etc/firestarter/user-pre
First thing to do is to make it writable (it’s a read-only file) then paste these lines and save the file :
# Allow OpenVPN traffic
$IPT -A INPUT -i tun+ -j ACCEPT
$IPT -A OUTPUT -o tun+ -j ACCEPT
Restart Firestarter :
sudo /etc/init.d/firestarter restart
It should work now
! Just re-check your Online IP to see if it changed !

0 Responses to “OpenVPN connected but No Surf in Ubuntu”