Swap interfaces
-
Hi,
I'm planning to move in a new appartement but I'm not sure to have a physical connection available as soon as arrived.
Firstly, I thought of buying a 4G router and simply connect it to the WAN interface of my netgate SG-1100, that way I would not have anything to change on it.
But I've seen that the Netgate is capable of doing tethering, I've tried connecting my phone to one of the USB port, an interface showed up (ue0). I've enabled it and assigned to OPT2 + configured using DHCP and was able to obtain an IP address.
I would like to know if there is a simple way to swap the current WAN interface (ethernet) with the new interface OPT2 without loosing all the current configuration (fw rules + NAT)?
Once I'll get my physical connection to the fiber network, I will swap the interfaces again.
Is this possible? And if yes, can you tell me where should I look into the documentation?
If it request too much configuration, I think I'll just by a tethering router and plug it through the WAN ethernet interface.
-
@freyja said in Swap interfaces:
I've tried connecting my phone to one of the USB port, an interface showed up (ue0). I've enabled it and assigned to OPT2 + configured using DHCP and was able to obtain an IP address.
Remove OPT2 again and assign ue0 to WAN instead.
-
@viragomann oh yeah I see.
I will not loose or reset any configuration by doing so ? -
@freyja
Not that I remember. This replaces only the hardware port assignment of an existing interface. The rules should unaffected. -
Also just in case - ssh into the box and dump the raw configuration file. I remember switching from a software firewall to dedicated hardware - I actually did search-and-replace with all the virtual interfaces to physical interfaces and VLAN's "offline" and then replaced the config file. To make sure that everything is done "at once". This was of course a much larger and error-prone operation than yours which is quit straightforward. I will be doing the same when changing my pfsync interface from OPT6 top OPT8 in a few days and IO expect no issues at all when doing that. My nexst stap is then to move one server segment from a VLAN to OPT6 - and I do not expect any issues there either.
As long as you don't change the order of the "logical interfaces" - where your rules are (or delete any of them) and ONLY change physical interfaces you are OK.
-
@tsmalmbe @viragomann many thanks to both of you.
I guess I need to give it a try now :D -
Yup, backup your working config first. You can do that from the GUI though in Diag > Backup/Restore.
Be aware that once you assign ue0 pfSense will require that to boot. So if you disconnect your phone without unassigning it first and then pfSense reboots for any reason you will need to access the serial console.
Steve