0

I installed Openvpn on Ubuntu 16.04.4 OVH VPS using the following script I found on github:

https://github.com/Angristan/OpenVPN-install

Openvpn was then configured using the default settings. An .ovpn file was generated.

Using this .ovpn file, I am able to connect to the Openvpn server successfully. However, I am unable to get an internet connection when I open an internet browser.

Can anyone help? Thanks in advance.

I have edited this question to include additional details:

My computer is the client and I am trying to connect to my own remote openVPN VPS server that I have set-up.

Here is the client .ovpn file. Personal information has been redacted:

client
proto udp
remote **.**.**.*** 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name ***** name
auth SHA256
auth-nocache
cipher AES-128-CBC
tls-clien
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
setenv opt block-outside-dns
verb 3
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=*******
Validity
Not Before: Jun 13 13:32:32 2018 GMT
Not After : Jun 10 13:32:32 2028 GMT
Subject: CN=client
Subject Public Key Info
Public Key Algorithm: rsaEncryption
Public-Key: (3072 bit)
Modulus:
*removed*
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier: 
*removed*
X509v3 Authority Key Identifier: 
*removed*
DirName:/CN=*****
serial:*removed*
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
*removed*

-----BEGIN CERTIFICATE-----
*removed*
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
*removed*
-----END PRIVATE KEY-----
</key>

key-direction 1

<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
*removed*
-----END OpenVPN Static key V1-----
</tls-auth>

I have included the iptable rules of the remote VPS server:

****@****:~# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source 

Chain INPUT (policy ACCEPT)
target     prot opt source               destination 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination  
MASQUERADE  all  --  10.8.0.0/24          anywhere 
MASQUERADE  all  --  anywhere             anywhere  

IP4 forwarding is enabled and set to 1 on the remote VPS server

****@****:~# cat /etc/sysctl.conf | grep net.ipv4.ip_forward
net.ipv4.ip_forward=1

****@****:~# cat /proc/sys/net/ipv4/ip_forward
1
  • Is your computer a client connecting to someone else's OpenVPN server, or did you set up your own server? It would help if you edited your question to include your .ovpn file, redacting any personal information. – Organic Marble Jun 13 '18 at 21:11
  • My computer is the client and I am trying to connect to my own remote VPS server. The VPS server was bought from OVH Cloud Hosting and was pre-configured with Ubuntu 16.04. I used a script to install openVPN on this server. I have edited the original question to include the client .ovpn file and additional information of the VPS server regarding IP table rules and IP4 port fowarding. Thanks. Any help is greatly appreciated. – fmvp Jun 15 '18 at 11:06
0

try pinging the various interfaces in route to ISP to see where issue is. Also did you setup DNS for client? Your local router DHCP probably is not filling in that blank anymore. Is your VPN server providing new DNS server info or services? Usually VPN servers have DNS services at least as forwarding.

But you could plug some hard coded IPs for DNS servers into your client to get quick and dirty working Internet.

You might have access to all world's raw IPs...but missing DNS can make it hard to use browser.

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.