1

I'm new here so please do not hesitate if you need additional informations :)

I have an old PC on which one I have installed Ubuntu with a web server (PHP, MySQL...) so that I can access all of its services (Web (port 80), SSH and FTP) from my local network via local IP 192.168.1.X (static).

Now, I want to be able to connect to the local network and do the same things but from everywhere in the world. Moreover, I want the connection to be secure: what I mean is that I don't want anybody to access my web pages.

The best solution I found is via VPN: I installed OpenVPN server and now I can access SSH, FTP and web from everywhere. The last problem is that, when I am connected to the VPN, I haven't any internet connection. I cannot understand why the OpenVPN server does not handle the requests.

To setup the OpenVPN server, I used this, using my PC's local IP for the first step and using my router's IP when asked for NATed connection details.

After many attemps, I am asking you some help. If you need any log or info, just ask :)

Thanks !

  • I did not specify it in my post, but I did a lot of research on the web – BlueskyFR Jan 4 '18 at 22:18
  • 2
    Tecnically if you're connected to the vpn you have internet connection. I've recently connected to a network where i was able to see the other machines but no "internet connection". The problem was the dns server, there wasn't any configured as default. Ping google dns server ping 8.8.8.8, if you can ping it, the problem is solvable with echo 'nameserver 8.8.8.8' | sudo tee --append /etc/resolv.conf && echo 'nameserver 8.8.4.4' | sudo tee --append /etc/resolv.conf – bistoco Jan 4 '18 at 22:32
1

Finally, thanks to bistoco's answer, I changed the DNS on both the ubuntu server and the client (Windows) to Google's one (8.8.8.8) because I was able to ping it successfully. On ubuntu, I used the GUI; on Windows, I changed the DNS for my wifi card and for the OpenVPN TAP Adapter.

I hope it will help someone :)

| improve this answer | |
1

Unfortunately my reputation wont allow for comments. So an answer. Seems like your you didnt update your configuration. This answer works but the internet connectivity is very slow. This answer is better. To sum up things mentioned there, you need to update your ubuntu DNS configuration at the client side. Add the following lines in the openvpn key

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.