Zenuncl Wiki

Genius only means hard-working all one's life...
Networking

UniFi

/ networking / UniFi

# Enable access to Modem

Need ssh connection to UniFi USG router

configure
set interfaces pseudo-ethernet peth0 link eth0
set interfaces pseudo-ethernet peth0 address 192.168.100.100/24
set interfaces pseudo-ethernet peth0 description "Access to modem"
set service nat rule 5001 type masquerade
set service nat rule 5001 destination address 192.168.100.1
set service nat rule 5001 outbound-interface peth0
commit;save;exit

To 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:

Last Update: 2024-11-11 04:04:12 Source File