Thank you again for your work you put into this. After sleeping one night, I went back to my idea about port sharing I mentioned earlier in this thread. So I went ahead an tried to make openvpn listen to my WAN IP and some DNS service on localhost. This is my netstat output now:
You said that ports cannot be shared, but after a good nights sleep I figured I should try anyway. So far it looks good to me and the first tests resulted in a good outcome. Unfortunately, I cannot test this proberly due to the networks I have currently available and they don't like connections to UDP port 53. I may test this in the future more thoroughly.
Code:
netstat -tulpn | grep :53
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 334/systemd-resolve
tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 334/systemd-resolve
tcp 0 0 0.0.0.0:5355 0.0.0.0:* LISTEN 334/systemd-resolve
udp 0 0 192.168.0.7:53 0.0.0.0:* 1497/openvpn
udp 0 0 127.0.0.54:53 0.0.0.0:* 334/systemd-resolve
udp 0 0 127.0.0.53:53 0.0.0.0:* 334/systemd-resolve
udp 0 0 0.0.0.0:5355 0.0.0.0:* 334/systemd-resolve
You said that ports cannot be shared, but after a good nights sleep I figured I should try anyway. So far it looks good to me and the first tests resulted in a good outcome. Unfortunately, I cannot test this proberly due to the networks I have currently available and they don't like connections to UDP port 53. I may test this in the future more thoroughly.