Best way of setting Static IP for WAN when connecting remotely

Hello,

We are using the RB2011/RB4011 in our environment.
These are sent to our customers with DHCP enabled for WAN.
Once they arrive on site, we often need to set the WAN to a Static IP.
What is the best way of configuring the WAN side IP/Gateway/DNS when connecting remotely (ie Teamviewer) so that we do not lose connection?)

Wild assed guess…
Preconfigured for wireguard VPN perhaps… with IP Cloud turned on…
That way when you change the WAN from dynamic to static, you will be reconnected almost automatically.???

Why team viewer to change config…when you can go direct…

Maybe I’m going about this ass backwards or something.

We ship a router out to end customer pre-programmed
About 25% need the WAN set statically.
We remote in (Teamviewer); log into Router and go to set WAN IP and then we get disconnected (We need to set DNS next I assume?)

Should we make a script?

I’m curious how you are getting to it via TeamViewer (which I use regularly and am very familiar with). I assume you remote into a PC (which would need to be set up for it) on the LAN and then access the router from there. However, if the ISP is supplying a static IP, it most likely is not supplying DHCP capability on your internet connection, so the router can’t get an IP, therefore Internet service would not work at all. So what am I missing?

Yeah the workflow is bit unclear. So there is PC someplace with TeamViewer on the remote site… and you winbox/ssh from that PC to access the router.

The central question is how does the thing running TeamViewer at the site connect to internet? Is it via the router you want to update with WAN on?


If you’re using the CLI to the router, perhaps using curly braces around the needed commands would help. e.g. { /ip/dhcp-client disable [find]; /ip/address/add address=…; /ip/dns/set servers=… }

This “group” them into local block at CLI, so they’d all run in sequence — essentially all your changes are one command then at the CLI. So even if you get disconnected during some step… all commands will still run in background… And if the command you grouped resulted in the needed static config, you should be able to reconnect after them. Without the { } around the commands, anything entered at CLI are processed one at time…so easy to end up in bad state.

dual-stack? connect with ipv6 to modify ipv4 then connect with ipv4 to modify ipv6