Hi all,
to preface, I'm very new to the world of networking/coding, so I have no clue if I just messed up a small step or set the entire server up incorrectly. I was following along this tutorial to set up an openvpn server on my raspberry pi using stunnel as the ssl:
https://www.youtube.com/watch?v=nnQDiGBFIXk&list=LLZmVEk2FGzZdnOV44HaFw4g&index=14&t=0s&ab_channel=upgrdman
after a good bit of trial and error, I seem to have gotten the servers up, but when I try to connect on my computer/android I cannot access the internet. I've searched up my error messages on google, but nothing seems to be helping... I've been scratching my head trying to figure out what exactly went wrong for about a week now and I just can't seem to figure it out.
any help would be extremely appreciated.
server conf:
port 1194
proto tcp
dev tun
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/its-me-bitch.crt
key /etc/openvpn/easy-rsa/keys/its-me-bitch.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 5 30
comp-lzo
persist-key
persist-tun
status /var/log/openvpn.log
verb 3
desktop client:
client
dev tun
proto tcp
remote localhost 1337
route www.[mywebsite].com 255.255.255.255 net_gateway
resolv-retry infinite
nobind
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
auth-nocache
remote-cert-tls server
comp-lzo
verb 3
# copy over the contents of your pi's /etc/openvpn/easy-rsa/keys/ca.crt
<ca>
[certificate authority]
</ca>
#copy over the contents of your pi's /etc/openvpn/easy-rsa/keys/desktop-client.crt
<cert>
[certificate]
</cert>
#copy over the contents of your pi's /etc/openvpn/easy-rsa/keys/desktop-client.key
<key>
[desktop client key]
</key>
this is the error code I get when I try to start the service on my computer:
Sun Aug 19 17:43:25 2018 OpenVPN 2.4.6 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Apr 26 2018
Sun Aug 19 17:43:25 2018 Windows version 6.2 (Windows 8 or greater) 64bit
Sun Aug 19 17:43:25 2018 library versions: OpenSSL 1.1.0h 27 Mar 2018, LZO 2.10
Sun Aug 19 17:43:25 2018 TCP/UDP: Preserving recently used remote address: [AF_INET6]::1:1337
Sun Aug 19 17:43:25 2018 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Aug 19 17:43:25 2018 Attempting to establish TCP connection with [AF_INET6]::1:1337 [nonblock]
Sun Aug 19 17:45:25 2018 TCP: connect to [AF_INET6]::1:1337 failed: Unknown error
Sun Aug 19 17:45:25 2018 SIGUSR1[connection failed(soft),init_instance] received, process restarting
Sun Aug 19 17:45:25 2018 Restart pause, 5 second(s)
Sun Aug 19 17:45:30 2018 TCP/UDP: Preserving recently used remote address: [AF_INET]127.0.0.1:1337
Sun Aug 19 17:45:30 2018 Socket Buffers: R=[65536->65536] S=[65536->65536]
Sun Aug 19 17:45:30 2018 Attempting to establish TCP connection with [AF_INET]127.0.0.1:1337 [nonblock]
Sun Aug 19 17:45:30 2018 TCP connection established with [AF_INET]127.0.0.1:1337
Sun Aug 19 17:45:30 2018 TCP_CLIENT link local: (not bound)
Sun Aug 19 17:45:30 2018 TCP_CLIENT link remote: [AF_INET]127.0.0.1:1337
Sun Aug 19 17:45:30 2018 TLS: Initial packet from [AF_INET]127.0.0.1:1337, sid=8483e113 de4df1b4
Sun Aug 19 17:45:30 2018 VERIFY OK: depth=1, CN=its-me-bitch
Sun Aug 19 17:45:30 2018 VERIFY KU OK
Sun Aug 19 17:45:30 2018 Validating certificate extended key usage
Sun Aug 19 17:45:30 2018 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sun Aug 19 17:45:30 2018 VERIFY EKU OK
Sun Aug 19 17:45:30 2018 VERIFY OK: depth=0, CN=its-me-bitch
Sun Aug 19 17:45:30 2018 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
Sun Aug 19 17:45:30 2018 [its-me-bitch] Peer Connection Initiated with [AF_INET]127.0.0.1:1337
Sun Aug 19 17:45:31 2018 SENT CONTROL [its-me-bitch]: 'PUSH_REQUEST' (status=1)
Sun Aug 19 17:45:31 2018 PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route 10.8.0.1,topology net30,ping 5,ping-restart 30,ifconfig 10.8.0.6 10.8.0.5,peer-id 0,cipher AES-256-GCM'
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: timers and/or timeouts modified
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: --ifconfig/up options modified
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: route options modified
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: peer-id set
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: adjusting link_mtu to 1659
Sun Aug 19 17:45:31 2018 OPTIONS IMPORT: data channel crypto options modified
Sun Aug 19 17:45:31 2018 Data Channel: using negotiated cipher 'AES-256-GCM'
Sun Aug 19 17:45:31 2018 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Aug 19 17:45:31 2018 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sun Aug 19 17:45:31 2018 interactive service msg_channel=0
Sun Aug 19 17:45:31 2018 ROUTE_GATEWAY 192.168.50.1/255.255.255.0 I=21 HWADDR=2c:fd:a1:6c:cd:23
Sun Aug 19 17:45:31 2018 open_tun
Sun Aug 19 17:45:31 2018 TAP-WIN32 device [Ethernet 3] opened: \\.\Global\{98C1F847-3568-4E40-BB11-18FEBF90AD19}.tap
Sun Aug 19 17:45:31 2018 TAP-Windows Driver Version 9.21
Sun Aug 19 17:45:31 2018 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.6/255.255.255.252 on interface {98C1F847-3568-4E40-BB11-18FEBF90AD19} [DHCP-serv: 10.8.0.5, lease-time: 31536000]
Sun Aug 19 17:45:31 2018 NOTE: FlushIpNetTable failed on interface [13] {98C1F847-3568-4E40-BB11-18FEBF90AD19} (status=5) : Access is denied.
Sun Aug 19 17:45:31 2018 do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Sun Aug 19 17:45:36 2018 TEST ROUTES: 3/3 succeeded len=2 ret=1 a=0 u/d=up
Sun Aug 19 17:45:36 2018 C:\WINDOWS\system32\route.exe ADD 127.0.0.1 MASK 255.255.255.255 192.168.50.1
Sun Aug 19 17:45:36 2018 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=21]
Sun Aug 19 17:45:36 2018 Route addition via IPAPI failed [adaptive]
Sun Aug 19 17:45:36 2018 Route addition fallback to route.exe
Sun Aug 19 17:45:36 2018 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sun Aug 19 17:45:36 2018 ERROR: Windows route add command failed [adaptive]: returned error code 1
Sun Aug 19 17:45:36 2018 C:\WINDOWS\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 10.8.0.5
Sun Aug 19 17:45:36 2018 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=13]
Sun Aug 19 17:45:36 2018 Route addition via IPAPI failed [adaptive]
Sun Aug 19 17:45:36 2018 Route addition fallback to route.exe
Sun Aug 19 17:45:36 2018 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sun Aug 19 17:45:36 2018 ERROR: Windows route add command failed [adaptive]: returned error code 1
Sun Aug 19 17:45:36 2018 C:\WINDOWS\system32\route.exe ADD 128.0.0.0 MASK 128.0.0.0 10.8.0.5
Sun Aug 19 17:45:36 2018 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=13]
Sun Aug 19 17:45:36 2018 Route addition via IPAPI failed [adaptive]
Sun Aug 19 17:45:36 2018 Route addition fallback to route.exe
Sun Aug 19 17:45:36 2018 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sun Aug 19 17:45:37 2018 ERROR: Windows route add command failed [adaptive]: returned error code 1
Sun Aug 19 17:45:37 2018 C:\WINDOWS\system32\route.exe ADD 24.130.18.99 MASK 255.255.255.255 192.168.50.1
Sun Aug 19 17:45:37 2018 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=21]
Sun Aug 19 17:45:37 2018 Route addition via IPAPI failed [adaptive]
Sun Aug 19 17:45:37 2018 Route addition fallback to route.exe
Sun Aug 19 17:45:37 2018 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sun Aug 19 17:45:37 2018 ERROR: Windows route add command failed [adaptive]: returned error code 1
Sun Aug 19 17:45:37 2018 C:\WINDOWS\system32\route.exe ADD 10.8.0.1 MASK 255.255.255.255 10.8.0.5
Sun Aug 19 17:45:37 2018 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied. [status=5 if_index=13]
Sun Aug 19 17:45:37 2018 Route addition via IPAPI failed [adaptive]
Sun Aug 19 17:45:37 2018 Route addition fallback to route.exe
Sun Aug 19 17:45:37 2018 env_block: add PATH=C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
Sun Aug 19 17:45:37 2018 ERROR: Windows route add command failed [adaptive]: returned error code 1
Sun Aug 19 17:45:37 2018 Initialization Sequence Completed
the thing is it says it initialized??? But once I actually connect, I can't load any websites and I'm pretty sure my ip stays the same too ?
again, any help would be appreciated I feel like I've hit a brick wall trying to get this dang thing to work properly!!
(p.s. I'm 99% sure none of my sensitive info is in any of that code/ error dialog, but please please tell me if there is, I'll be sure to edit that out! thanks!)