Killswitch accept rule port doesn't match NordVPN .ovpn ports

Hi,

When using the dietpi killswitch with NordVPN on a new dietpi install, I noticed in the iptables it would allow only port 1194, however the actual connection through the .ovpn file was ports 1231-1234. So obviously when active, the connection was being dropped as it wasn’t using the openVPN 1194 port.

I have edited the killswitch file myself to add

-A OUTPUT -d $VPN_SERVER -p $PROTOCOL --dport 1231:1234 -j ACCEPT

which I understand won’t persist on software updates. Not sure why Nord no longer uses the openvpn 1194 port, but I thought I would bring this to the attention of the forum.

Does anyone have any further insight? Can anyone see any issue with the change I’ve made?

let me ping @MichaIng

How are multiple ports defined? The remote and port options do not seem to allow multiple arguments or a range: openvpn(8) — openvpn — Debian trixie — Debian Manpages
Or is it just defined multiple times?

We’d need to find a way to parse and set multi-port values, then apply it here: DietPi/dietpi/dietpi-vpn at 14ba58796b75cc9e95dc4230196d5f7697724e2a · MichaIng/DietPi · GitHub
Or we could alter the config to use just one of the possible ports.