Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8621

Troubleshooting • Re: Raspberry as Wifi Hotspot with NordVPN

$
0
0
Nice Nice.
My goal is to have the pi / nordvpn / hotspot starting all nicely even after a reboot of the pi, without needing to login.

For the hotspot, this does the trick: nmcli con mod Hotspot connection.autoconnect yes
For Nordvpn, this does the trick: nordvpn set autoconnect on

BUT for the iptables rule to be applied, I did not find an elegant solutio. If I add my rule, then Nordvpn will add it's rule at the top of the table, and the dhcp rule is moved at the bottom, after the DROP section added by NordVPN, which prevent my dhcp rule to allow the traffic. The only way I get it to work is to resort to a cronjob that re-add my dhcp rule at the top, every minute (Delete / re-insert)

Code:

crontab -e
then add:

Code:

* * * * * /bin/bash -c   '/sbin/iptables -D INPUT -i wlan0 -p udp --sport 67:68 --dport 67:68 -j ACCEPT 2>/dev/null; /sbin/iptables -I INPUT 1 -i wlan0 -p udp --sport 67:68 --dport 67:68 -j ACCEPT'
I am not an iptable expert, maybe there is a better way. But this work well enough for me at this stage.
If you find a better way let me know.

Statistics: Posted by cofcof — Mon Mar 17, 2025 10:03 pm



Viewing all articles
Browse latest Browse all 8621

Trending Articles