OpenVPN Problem

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
localhorst46

OpenVPN Problem

Post by localhorst46 »

Hello!
I'm trying to set up my Raspberry Pi as an OpenVPN Server and having trouble with it.
The connection to the OpenVPN Server can be established. But I'm not able to ping any devices in the network of the OpenVPN Server and I don't have internet access.

Does anybody have an idea what could be the problem, based on the following information?

Here is the routing table on the Server (where the IP-Address of the OpenVPN is 192.168.0.20):

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG    202    0        0 eth0
10.8.0.0        192.168.0.20    255.255.255.0   UG    0      0        0 eth0
10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
192.168.0.0     0.0.0.0         255.255.255.0   U     202    0        0 eth0
Here are my iptables settings:

Code: Select all

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  10.8.0.0/24          anywhere             ctstate NEW
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   
And Here is the routing table on my client (which is connected over a HotSpot from my mobile phone 192.168.43.1 to the internet)
(I replaced my public ip with <server-ip>)

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.8.0.5        128.0.0.0       UG    0      0        0 tun0
0.0.0.0         192.168.43.1    0.0.0.0         UG    0      0        0 wlan1
10.8.0.1        10.8.0.5        255.255.255.255 UGH   0      0        0 tun0
10.8.0.5        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
128.0.0.0       10.8.0.5        128.0.0.0       UG    0      0        0 tun0
192.168.0.0     10.8.0.5        255.255.255.0   UG    0      0        0 tun0
192.168.43.0    0.0.0.0         255.255.255.0   U     9      0        0 wlan1
<server-ip>   192.168.43.1    255.255.255.255 UGH   0      0        0 wlan1
Thank you very much in advance!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: OpenVPN Problem

Post by DrHu »

You are not on the same network or pings would work correctly
  • <server-ip> 192.168.43.1 255.255.255.255 UGH 0 0 0 wlan1
--from you web (WIFI) phone connection, I think !!

Not sure that you don't also need an AP(Access Point) for the wifi connection
otherwise how will wifi conect to ethernet

It might help to know what guide you followed to setup the openvpn server on the rapperry PI
http://readwrite.com/2014/04/10/raspber ... -browsing/
http://www.sans.org/reading-room/whitep ... y-pi-34427
--that was the original PDF file that this user based his guide on..
Locked

Return to “Networking”