Connecting to VPN through cellular
-
- OpenVpn Newbie
- Posts: 8
- Joined: Wed May 05, 2021 9:55 pm
Connecting to VPN through cellular
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.
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Connecting to VPN through cellular
Last edited by TinCanTech on Fri May 07, 2021 8:55 pm, edited 2 times in total.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Wed May 05, 2021 9:55 pm
Re: Connecting to VPN through cellular
I think I used a script, I used some fairly simple guides.TinCanTech wrote: ↑Fri May 07, 2021 5:42 pmDid you setup the server yourself or did you use a script ?
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...
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Connecting to VPN through cellular
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.
Your server config file will probably be in /etc/openvpn ..
And please name the script.
-
- OpenVpn Newbie
- Posts: 8
- Joined: Wed May 05, 2021 9:55 pm
Re: Connecting to VPN through cellular
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.
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...
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...
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVpn Newbie
- Posts: 8
- Joined: Wed May 05, 2021 9:55 pm
Re: Connecting to VPN through cellular
Yep that's the one...
Could you also please explain how to get those files? I googled it as well without any good result.
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Connecting to VPN through cellular
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