Unable to access dietpi when connected via OpenVPN Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
esel2k
Posts: 5
Joined: Sat Mar 21, 2020 9:38 pm

Unable to access dietpi when connected via OpenVPN

Post by esel2k »

Hi all,

My dietpi on a rpi 4 works like a charm. I have my OpenVPN server running on my asus merlin router and can connect. I can access all my NAS etc on my network but impossible to connect to my dietpi.

I can perfect access my dietpi with my phone when in Wifi/local lan and my DHCP gives me any ip in this range: 192.168.1.X.
When I am connected using the OpenVPN my ip will be: 10.8.0.2 and apparently I am either blocked or something else will avoid me from connecting to the dietpi.

My goal was to access my LMS to listen to music on the go. Thanks

Any idea what could block the acces to my dietpi? Firewall or anything else?
Thank you
User avatar
trendy
Posts: 340
Joined: Tue Feb 25, 2020 2:54 pm

Re: Unable to access dietpi when connected via OpenVPN

Post by trendy »

By default there is no firewall in dietpi. Did you install any yourself?
Show us the following from dietpi:

Code: Select all

sudo iptables-save -c
ip -4 addr; ip -4 ro li tab all; ip -4 ru
esel2k
Posts: 5
Joined: Sat Mar 21, 2020 9:38 pm

Re: Unable to access dietpi when connected via OpenVPN

Post by esel2k »

I don't remember having installed any firewall, that's why I was wondering.


Here the results:

root@rpi:~# ip -4 addr; ip -4 ro li tab all; ip -4 ru
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
inet 192.168.1.10/24 brd 192.168.1.255 scope global eth0
valid_lft forever preferred_lft forever
3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
inet 10.8.0.1 peer 10.8.0.2/32 scope global tun0
valid_lft forever preferred_lft forever
default via 192.168.1.1 dev eth0 onlink
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.10
local 10.8.0.1 dev tun0 table local proto kernel scope host src 10.8.0.1
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.1.0 dev eth0 table local proto kernel scope link src 192.168.1.10
local 192.168.1.10 dev eth0 table local proto kernel scope host src 192.168.1.10
broadcast 192.168.1.255 dev eth0 table local proto kernel scope link src 192.168.1.10
0: from all lookup local
32766: from all lookup main
32767: from all lookup default


Thank you
User avatar
Joulinar
Posts: 5086
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to access dietpi when connected via OpenVPN

Post by Joulinar »

hmm I'm a little bit confused. You told OpenVPN is running as server on your internet router. However I can see VPN interface as well on your DietPi device, indicating a VPN server as well. Just for clarification: Where is the VPN server is running on?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 340
Joined: Tue Feb 25, 2020 2:54 pm

Re: Unable to access dietpi when connected via OpenVPN

Post by trendy »

There is a tunnel interface on the dietpi using the same addresses as the OpenVPN server on your router. If you created it accidentally and it is not used, you can remove it altogether. Otherwise, if you are using this tunnel for something else, you'll need to change the subnet to something else not conflicting with the router tunnel.
esel2k
Posts: 5
Joined: Sat Mar 21, 2020 9:38 pm

Re: Unable to access dietpi when connected via OpenVPN

Post by esel2k »

Sorry for the late reply.

That was exactly it. Actually at the beginning I was not sure if I would use the OpenVPN on my router or on my rpi. After deinstalling OpenVPN on dietpi and rebooting it works perfectly. Thank you!!
Post Reply