UniFi
Enable access to Modem
Section titled “Enable access to Modem”Need ssh connection to UniFi USG router
configureset interfaces pseudo-ethernet peth0 link eth0set interfaces pseudo-ethernet peth0 address 192.168.100.100/24set interfaces pseudo-ethernet peth0 description "Access to modem"set service nat rule 5001 type masqueradeset service nat rule 5001 destination address 192.168.100.1set service nat rule 5001 outbound-interface peth0commit;save;exitTo make the change permanent, edit the config.gateway.json file:
{ "interfaces": { "pseudo-ethernet": { "peth0": { "address": ["192.168.100.100/24"], "description": "Access to modem", "link": ["eth0"] } } }, "service": { "nat": { "rule": { "5001": { "destination": { "address": ["192.168.100.1"] }, "outbound-interface": ["peth0"], "type": "masquerade" } } } }}Reference: