Last active
August 15, 2021 16:46
-
-
Save fvoges/c192b43c91b935bfdf5d158ae735878a to your computer and use it in GitHub Desktop.
UniFi USG multiple public IPs config (sauce: https://blog.wefixit.at/unifi-security-gateway-add-an-additional-public-ip-with-nat/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"interfaces": { | |
"ethernet": { | |
"eth0": { | |
"address": [ | |
"10.0.0.1/29", | |
"10.0.0.2/29" | |
], | |
"firewall": { | |
"in": { | |
"name": "WAN_IN" | |
}, | |
"local": { | |
"name": "WAN_LOCAL" | |
}, | |
"out": { | |
"name": "WAN_OUT" | |
} | |
} | |
} | |
} | |
}, | |
"service": { | |
"nat": { | |
"rule": { | |
"3000": { | |
"description": "DNAT 10.0.0.2 TCP/8080 to 192.168.0.2", | |
"destination": { | |
"address": "10.0.0.2", | |
"port": "80" | |
}, | |
"inbound-interface": "eth0", | |
"inside-address": { | |
"address": "192.168.0.2", | |
"port": "8080" | |
}, | |
"log": "enable", | |
"protocol": "tcp", | |
"type": "destination" | |
}, | |
"5000": { | |
"description": "SNAT 192.168.0.2 TCP/8080 to 10.0.0.2", | |
"log": "enable", | |
"outbound-interface": "eth0", | |
"outside-address": { | |
"address": "10.0.0.2", | |
"port": "80" | |
}, | |
"protocol": "tcp", | |
"source": { | |
"address": "192.168.0.2", | |
"port": "8080" | |
}, | |
"type": "source" | |
} | |
} | |
} | |
}, | |
"firewall": { | |
"name": { | |
"WAN_IN": { | |
"default-action": "drop", | |
"rule": { | |
"1000": { | |
"action": "accept", | |
"description": "NAT 10.0.0.2 TCP/8080 to 192.168.0.2", | |
"destination": { | |
"address": "192.168.0.2", | |
"port": "8080" | |
}, | |
"log": "enable", | |
"protocol": "tcp" | |
}, | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment