Jump to content

S912 Open VPN issues


thecubasekid

Recommended Posts

HI All,

 

Brand new user to Armbian, and fairly new user to linux here! running Debian bullseye desktop version, downloaded and install about a week ago....

 

First off, loving what Armbian has done to my old S912 box, thanks very much for this fantastic image!

 

i have been able to get it all set mostly the way i would want and have set up a nextpvr back-end server that is working very well feeding other 'kodi' boxes dotted around the house.

 

on to my issue, hopefully it is something easy to address, i have set up openvpn using the network manager gui, and it connects just fine, and 'tun0' shows as connected, however, no traffic appears to actually route through the VPN. if i go to whats my ip, it shows the IP from my ISP regardless to weather the VPN is connected or not.

 

i tried googling for advice, but could not find anything specific for Armbian, i did find lots of differing advise aimed at Debian and Ubuntu. but when i tried to follow some of the advice i either could not find files i was directed to , or didn't get the output in terminal i was expecting, i'm. very new to this.

 

if anyone has any advice i could follow to try to understand why this is happening and how to address it would be very much appreciated.

 

Thanks!

Edited by thecubasekid
grammar
Link to comment
Share on other sites

I moved this to the TV Box General Chat forum, as there is nothing to indicate this is CPU specific.

 

Congrats on getting your box up and running.  The issue you are reporting in userland software (i.e. debian software installed on your hardware) likely has nothing to do with armbian.  Your best bet is going to continue to follow the paths you have been looking at (debian / openvpn forums) where the specifics of your software are discussed.  There aren't many people around these forums that are likely to be able to help on an issue like this.  However, you never know and someone may be able to offer some advice.

Link to comment
Share on other sites

Thanks for the advice guys, i tried adding the user but it didn't help.

 

after much searching and trying lots of stuff (that ultimately screwed my install and led to me needing a fresh install!) i found a solution, or at least a big part of it.

 

when vpn is connected, i run the below and hey presto! and i am routing through VPN, VPN IP shows in whats my IP, and i can reach the geo locked sites i could not get to before :-)

 

sudo route add default dev tun0

 

still a big learning curve for me,  and the complete re-install (the third in a week ha ) is giving me some confidence that i can get all back without to much trouble and reasonably fast. ive learnt a lot although still scratching the surface.

 

just need to work out how to auto start the VPN on boot up then have some post script run the command to set the default route to tun0 (the setting in network manager applet does not persist, and does not even survive a close and re open let alone a reboot, same with my user or root)

 

Anyhow... thanks for the advice

Link to comment
Share on other sites

If this problem still unsolved, please provide:

  • Output from "systemctl status openvpn.service"
  • Output from "ifconfig"
  • Output from "ip a"

I don't know how to setup openvpn the network-manager style, but on cli it would be like this:

1. Copy provided .ovpn files from your VPN provider to /etc/openvpn. Rename them to .conf. (server1.ovpn --> server1.conf, server2.ovpn --> server2.conf and so on)
2. If you to have a specific VPN-server to connect durning booting (example server2), edit /etc/default/openvpn, add the line AUTOSTART=server2. Leave all the other lines commented, as they are.

3. The next boot you'll be prompted for your credentials for server2.

4. You can automate login, by creating a credential file (e.g. auth.txt) in /etc/openvpn containing first line your username, second line your password. In your providers .ovpn (or renamed .conf) find "auth-user-pass" and add a " auth.txt" (auth-user-pass --> auth-user-pass auth.txt). Ensure that auth.txt is executable. (chmod 755 auth.txt).

5. After configuring, do a reboot

 

All the times I configured my vpn it worked fine this way. To ensure to have the connection to vpn provider instead to your ISP use "curl ipinfo.io". The output should point to server2's ip address. If the output points to your own ip address, then you have a routing problem. I'm pretty sure there is a proper nm way to solve such a problem. On cli you might try altering iptables:

 

iptables -F
iptables -t nat -F
iptables -X

iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
iptables -A FORWARD -i tun0 -o <network interface, e.g. eth0> -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i <network interface, e.g. eth0> -o tun0 -j ACCEPT (example: iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT)

 

Hope, this will fix your problems.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines