Lukium
New Around Here
First of all, I want to thank everyone for all the great work on Asus-Merlin. I've been using it for years.
Here's the scenario I'm dealing with:
My router (GT-AX11000 running 386.3_2) is connected to Verizon WAN, and every time I reboot the router, I end up with a new IP address. This used to be fine until I added a device to the network that needs to have an IP that's not constantly changing. Long story short, DDNS and other similar solutions aren't an option. So I went ahead and setup a VPN server on Azure, and connected the router to the VPN using OpenVPN with the VPN Director option enabled so that not all traffic goes through the VPN (only want this specific device to have a dedicated IP). The device in question has a static IP setup on the router to 192.168.1.166, so I went ahead and setup VPN director to have all traffic to 192.168.1.166 to go through the VPN. Furthermore, all relevant traffic on this device happens on port 44158, so I added a simple script to jffs/scripts/ that's triggered by openvpn-event to forward the port through the VPN to the correct device. The command used is:
For the most part, the setup works great. After the device connects and boots, I can run a port checker to the VPN's Public IP and port 44158, and I get an open port, which is exactly what is necessary.
Here's the issue:
When the device first connects, it announces to the network it's on what its IP address is. Somehow, it's announcing the Verizon Public IP, instead of the Azure Public IP, which is leading me to believe that for some amount of time during boot it is exposed to the WAN IP instead of the VPN IP. Is there a way to ensure that this does not happen?
-----------------------------------------
EDIT:
I did a few more tests, here's some more relevant info:
Even if I set all traffic to go through the VPN, somehow the device is being exposed to the WAN IP and announcing it on its network.
------------------------------------------
Thanks,
Luke
Here's the scenario I'm dealing with:
My router (GT-AX11000 running 386.3_2) is connected to Verizon WAN, and every time I reboot the router, I end up with a new IP address. This used to be fine until I added a device to the network that needs to have an IP that's not constantly changing. Long story short, DDNS and other similar solutions aren't an option. So I went ahead and setup a VPN server on Azure, and connected the router to the VPN using OpenVPN with the VPN Director option enabled so that not all traffic goes through the VPN (only want this specific device to have a dedicated IP). The device in question has a static IP setup on the router to 192.168.1.166, so I went ahead and setup VPN director to have all traffic to 192.168.1.166 to go through the VPN. Furthermore, all relevant traffic on this device happens on port 44158, so I added a simple script to jffs/scripts/ that's triggered by openvpn-event to forward the port through the VPN to the correct device. The command used is:
Code:
iptables -t nat -A PREROUTING -i tun+ -p tcp --dport 44158 -j DNAT --to-destination 192.168.1.166:44158
For the most part, the setup works great. After the device connects and boots, I can run a port checker to the VPN's Public IP and port 44158, and I get an open port, which is exactly what is necessary.
Here's the issue:
When the device first connects, it announces to the network it's on what its IP address is. Somehow, it's announcing the Verizon Public IP, instead of the Azure Public IP, which is leading me to believe that for some amount of time during boot it is exposed to the WAN IP instead of the VPN IP. Is there a way to ensure that this does not happen?
-----------------------------------------
EDIT:
I did a few more tests, here's some more relevant info:
Even if I set all traffic to go through the VPN, somehow the device is being exposed to the WAN IP and announcing it on its network.
------------------------------------------
Thanks,
Luke
Last edited: