firewall {
all-ping enable
broadcast-ping disable
group {
address-group HackAttempts {
description HackAttempts
}
address-group NodePing {
description NodePing
}
network-group INTERNAL_NETWORK {
network 192.168.0.0/16
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
modify balance {
rule 10 {
description "do NOT load balance lan to lan"
destination {
group {
network-group INTERNAL_NETWORK
}
}
modify {
table main
}
}
rule 20 {
description "send to eth0"
modify {
table main
}
source {
address internal-ip-here
}
}
rule 30 {
description "All others - send to eth2"
modify {
table 50
}
}
}
name LAN_IN {
default-action accept
description "Block"
rule 1 {
action reject
destination {
address !192.168.100.0/24
}
log enable
source {
mac-address mac-here
}
}
}
name WAN_IN {
default-action drop
description "WAN to internal"
rule 10 {
action drop
description HackerAttempts
log disable
protocol all
source {
group {
address-group HackAttempts
}
}
state {
established enable
invalid enable
new enable
related enable
}
}
rule 20 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 30 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
name WAN_LOCAL {
default-action drop
description "WAN to router"
rule 10 {
action drop
description HackerIPs
log enable
protocol all
source {
group {
address-group HackAttempts
}
}
state {
established enable
invalid enable
new enable
related enable
}
}
rule 130 {
action accept
description "Allow WAN ICMP"
destination {
group {
address-group ADDRv4_eth0
}
}
icmp {
type 8
}
log enable
protocol icmp
source {
group {
address-group NodePing
}
}
}
rule 140 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 150 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
}
interfaces {
ethernet eth0 {
address dhcp
description Internet
duplex auto
firewall {
in {
modify balance
}
local {
name WAN_LOCAL
}
}
speed auto
}
ethernet eth1 {
address 192.168.100.1/24
description Local
duplex auto
speed auto
}
ethernet eth2 {
address dhcp
description MLFast
disable
duplex auto
speed auto
}
ethernet eth3 {
description Local
disable
duplex auto
speed auto
}
ethernet eth4 {
description Local
disable
duplex auto
speed auto
}
loopback lo {
}
switch switch0 {
description Local
mtu 1500
switch-port {
interface eth3 {
}
interface eth4 {
}
vlan-aware disable
}
}
}
port-forward { stuff here
}
protocols {
static {
table 50 {
route 0.0.0.0/0 {
next-hop 192.168.1.10 {
}
}
}
}
}
service {
dhcp-server {
disabled false
hostfile-update disable
shared-network-name LAN {
authoritative enable
subnet 192.168.100.0/24 {
default-router 192.168.100.1
dns-server 192.168.100.1
dns-server 8.8.8.8
lease 86400
start 192.168.100.100 {
stop 192.168.100.115
}
}
}
static-arp disable
use-dnsmasq disable
}
dns {
forwarding {
cache-size 150
listen-on eth0
listen-on eth1
}
}
gui {
http-port 80
https-port 443
older-ciphers enable
}
nat {
rule 5010 {
description "masquerade for WAN"
outbound-interface eth0
type masquerade
}
}
ssh {
port 22
protocol-version v2
}
}
system {
host-name ubnt
login {
user ubnt {
authentication {
encrypted-password *
plaintext-password *
}
full-name ""
level admin
}
}
ntp {
server 0.ubnt.pool.ntp.org {
}
server 1.ubnt.pool.ntp.org {
}
server 2.ubnt.pool.ntp.org {
}
server 3.ubnt.pool.ntp.org {
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone UTC
traffic-analysis {
dpi disable
export disable
}
}
vpn {
ipsec {
auto-firewall-nat-exclude enable
}
}
interfaces {
ethernet eth0 {
address dhcp
description Internet
duplex auto
firewall {
in {
modify balance
WAN_IN
}
local {
name WAN_LOCAL
}
}
speed auto
}
ethernet eth2 {
address dhcp
description Internet
duplex auto
firewall {
in {
modify balance
WAN_IN
}
local {
name WAN_LOCAL
}
}
speed auto
}
all-ping enable
broadcast-ping disable
group {
address-group HackAttempts {
address public IP list goes here of bad IP addresses
description HackAttempts
}
address-group NodePing {
address public IP list goes here of good/allowed IP addresses
description NodePing
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name LAN_IN {
default-action accept
description "Block internal machine"
rule 1 {
action reject
destination {
address !192.168.100.0/24
}
log enable
source {
mac-address xxxx
}
}
}
name WAN_IN {
default-action drop
description "WAN to internal"
rule 10 {
action drop
description HackerAttempts
log disable
protocol all
source {
group {
address-group HackAttempts
}
}
state {
established enable
invalid enable
new enable
related enable
}
}
rule 20 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 30 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
name WAN_LOCAL {
default-action drop
description "WAN to router"
rule 10 {
action drop
description HackerIPs
log enable
protocol all
source {
group {
address-group HackAttempts
}
}
state {
established enable
invalid enable
new enable
related enable
}
}
rule 130 {
action accept
description "Allow WAN ICMP"
destination {
group {
address-group ADDRv4_eth0
}
}
icmp {
type 8
}
log enable
protocol icmp
source {
group {
address-group NodePing
}
}
}
rule 140 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 150 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
}
interfaces {
ethernet eth0 {
address dhcp
description Internet
duplex auto
firewall {
in {
name LAN_IN
}
local {
name WAN_LOCAL
}
}
speed auto
}
ethernet eth1 {
address 192.168.100.1/24
description Local
duplex auto
speed auto
}
ethernet eth2 {
address dhcp
description Internet2
disable
duplex auto
speed auto
}
ethernet eth3 {
description Local
disable
duplex auto
speed auto
}
ethernet eth4 {
description Local
disable
duplex auto
speed auto
}
loopback lo {
}
switch switch0 {
description Local
mtu 1500
switch-port {
interface eth3 {
}
interface eth4 {
}
vlan-aware disable
}
}
}
port-forward {
auto-firewall enable
hairpin-nat enable
lan-interface eth1
rule 1 {
description "Internal stuff"
forward-to {
address internal address
port xxxx
}
original-port xxxx
protocol tcp_udp
}
wan-interface eth0
}
protocols {
static {
}
}
service {
dhcp-server {
disabled false
hostfile-update disable
shared-network-name LAN {
authoritative enable
subnet 192.168.100.0/24 {
default-router 192.168.100.1
dns-server 192.168.100.1
dns-server 8.8.8.8
lease 86400
start 192.168.100.100 {
stop 192.168.100.115
}
static-mapping EdgeSwitch {
ip-address 192.168.100.x
mac-address xxxx
}
static-mapping Machine {
ip-address 192.168.100.x
mac-address xxxx
}
}
}
static-arp disable
use-dnsmasq disable
}
dns {
forwarding {
cache-size 150
listen-on eth0
listen-on eth1
}
}
gui {
http-port 80
https-port 443
older-ciphers enable
}
nat {
rule 5010 {
description "masquerade for WAN"
outbound-interface eth0
type masquerade
}
}
ssh {
port 22
protocol-version v2
}
}
system {
host-name hostnamegoeshere
login {
user usernamegoeshere {
authentication {
encrypted-password *******
plaintext-password *******
}
full-name ""
level admin
}
}
ntp {
server 0.ubnt.pool.ntp.org {
}
server 1.ubnt.pool.ntp.org {
}
server 2.ubnt.pool.ntp.org {
}
server 3.ubnt.pool.ntp.org {
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone UTC
traffic-analysis {
dpi disable
export disable
}
}