Connecting to VPN through cellular

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
Bossman
OpenVpn Newbie
Posts: 8
Joined: Wed May 05, 2021 9:55 pm

Connecting to VPN through cellular

Post by Bossman » Fri May 07, 2021 5:31 pm

I setup my VPN on a Raspberry Pi 4B and I can connect to it from my home network and also from cellular. The only problem is that i can't access the internet through the VPN on both my computer as well as my mobile devices. I tried setting up a NAT but that did not seem to make a difference. Does anyone here have a solution to my problem? Thanks in advance.

User avatar
TinCanTech
Forum Team
Posts: 9191
Joined: Fri Jun 03, 2016 1:17 pm

Re: Connecting to VPN through cellular

Post by TinCanTech » Fri May 07, 2021 5:42 pm

Did you setup the server yourself or did you use a script ?

Please see:
viewtopic.php?f=30&t=22603
Last edited by TinCanTech on Fri May 07, 2021 8:55 pm, edited 2 times in total.

Bossman
OpenVpn Newbie
Posts: 8
Joined: Wed May 05, 2021 9:55 pm

Re: Connecting to VPN through cellular

Post by Bossman » Fri May 07, 2021 8:10 pm

TinCanTech wrote:
Fri May 07, 2021 5:42 pm
Did you setup the server yourself or did you use a script ?
I think I used a script, I used some fairly simple guides.
Also, I looked at the link you sent but I could not find the server.conf for example...
Sorry I'm not able to find these things, this is my first time doing this...

User avatar
TinCanTech
Forum Team
Posts: 9191
Joined: Fri Jun 03, 2016 1:17 pm

Re: Connecting to VPN through cellular

Post by TinCanTech » Fri May 07, 2021 8:54 pm

Please Start with the Howto and familiarise yourself with Openvpn at least a little.

Your server config file will probably be in /etc/openvpn ..

And please name the script.

Bossman
OpenVpn Newbie
Posts: 8
Joined: Wed May 05, 2021 9:55 pm

Re: Connecting to VPN through cellular

Post by Bossman » Sat May 08, 2021 9:46 am

Alright I looked some stuff up and now I'm not sure whether I used a script or not. What I did was download openvpn on the pi, and after that I had to configure some things like UDP/TCP and so forth.
I have found the server.conf, thanks a bunch for the clear explanation.

server


dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/raspberrypi_7fd32f4a-3f71-4427-8993-ad459cd0832f.crt
key /etc/openvpn/easy-rsa/pki/private/raspberrypi_7fd32f4a-3f71-4427-8993-ad459cd0832f.key
dh none
ecdh-curve prime256v1
topology subnet
server
# Set your primary domain name server address for clients
push "dhcp-option DNS 9.9.9.9"
push "dhcp-option DNS 149.112.112.112"
# Prevent DNS leaks on Windows
push "block-outside-dns"
# Override the Client default gateway by using 0.0.0.0/1 and
# 128.0.0.0/1 rather than 0.0.0.0/0. This has the benefit of
# overriding but not wiping out the original default gateway.
push "redirect-gateway def1"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
#DuplicateCNs allow access control on a less-granular, per user basis.
#Remove # if you will manage access by user instead of device.
#duplicate-cn
# Generated for use by PiVPN.io



Also, do I need to send you the whole openvnp.log? Because then I'd have a lot of ip addresses to delete... Is it correct that it is located in "/var/log/openvpn.log"?

I looked at the HOWTO extensively but I was not able to find the client files and did not understand how to get the server log...
Thanks again for the help and I'm sorry I'm not able to find those files...

User avatar
TinCanTech
Forum Team
Posts: 9191
Joined: Fri Jun 03, 2016 1:17 pm

Re: Connecting to VPN through cellular

Post by TinCanTech » Sat May 08, 2021 10:10 am

Bossman wrote:
Sat May 08, 2021 9:46 am
I looked at the HOWTO extensively but I was not able to find the client files and did not understand how to get the server log...
:roll:

https://github.com/pivpn/pivpn

Bossman
OpenVpn Newbie
Posts: 8
Joined: Wed May 05, 2021 9:55 pm

Re: Connecting to VPN through cellular

Post by Bossman » Sat May 08, 2021 10:27 am

TinCanTech wrote:
Sat May 08, 2021 10:10 am
https://github.com/pivpn/pivpn
Yep that's the one... :oops:

Could you also please explain how to get those files? I googled it as well without any good result.

User avatar
TinCanTech
Forum Team
Posts: 9191
Joined: Fri Jun 03, 2016 1:17 pm

Re: Connecting to VPN through cellular

Post by TinCanTech » Sat May 08, 2021 10:57 am


User avatar
TinCanTech
Forum Team
Posts: 9191
Joined: Fri Jun 03, 2016 1:17 pm

Re: Connecting to VPN through cellular

Post by TinCanTech » Sat May 08, 2021 11:07 am

Bossman wrote:
Fri May 07, 2021 5:31 pm
I setup my VPN on a Raspberry Pi 4B and I can connect to it from my home network
Then I presume this is for your work.

You can either study the extensive documentation like everybody else does
or you can pay somebody to do it for you.

I am available for hire: tincantech <at> protonmail dot com

Post Reply