Skip to content

Instantly share code, notes, and snippets.

@fvoges
Last active August 15, 2021 16:46
Show Gist options
  • Save fvoges/c192b43c91b935bfdf5d158ae735878a to your computer and use it in GitHub Desktop.
Save fvoges/c192b43c91b935bfdf5d158ae735878a to your computer and use it in GitHub Desktop.
{
"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