Skip to content

Instantly share code, notes, and snippets.

@hurrellit
Created September 22, 2016 10:26
Show Gist options
  • Save hurrellit/6b71408c91841162a2aad97f585f907b to your computer and use it in GitHub Desktop.
Save hurrellit/6b71408c91841162a2aad97f585f907b to your computer and use it in GitHub Desktop.
EdgeRouter Config
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name WAN_IN {
default-action drop
description "WAN to internal"
rule 10 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 20 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
name WAN_LOCAL {
default-action drop
description "WAN to router"
rule 10 {
action accept
description "Allow established/related"
state {
established enable
related enable
}
}
rule 20 {
action accept
description "Allow PPTP 1723"
destination {
port 1723
}
log enable
protocol tcp
}
rule 30 {
action accept
description "Allow GRE 47"
log enable
protocol gre
}
rule 40 {
action accept
description "Allow ICMP Ping"
log disable
protocol icmp
}
rule 50 {
action drop
description "Drop invalid state"
state {
invalid enable
}
}
}
options {
mss-clamp {
interface-type all
mss 1452
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
}
interfaces {
ethernet eth0 {
description "Internet (PPPoE)"
duplex auto
pppoe 0 {
default-route auto
firewall {
in {
name WAN_IN
}
local {
name WAN_LOCAL
}
}
mtu 1492
name-server auto
password ****************
user-id something@something.com
}
speed auto
}
ethernet eth1 {
address 192.168.10.1/24
description LAN1
duplex auto
speed auto
}
ethernet eth2 {
address 192.168.2.1/24
description LAN2
duplex auto
speed auto
}
loopback lo {
}
}
service {
dhcp-server {
disabled false
hostfile-update disable
shared-network-name LAN1 {
authoritative enable
subnet 192.168.10.0/24 {
default-router 192.168.10.1
dns-server 208.67.222.222
dns-server 208.67.220.220
lease 86400
start 192.168.10.10 {
stop 192.168.10.69
}
static-mapping MX2301N {
ip-address 192.168.10.5
mac-address 00:22:F3:9D:3D:C5
}
static-mapping WAP54G {
ip-address 192.168.10.4
mac-address 00:1A:70:AB:AD:24
}
static-mapping WN2013WAP {
ip-address 192.168.10.9
mac-address 44:94:FC:83:F9:38
}
}
}
shared-network-name LAN2 {
authoritative enable
disable
subnet 192.168.2.0/24 {
default-router 192.168.2.1
dns-server 192.168.2.1
lease 86400
start 192.168.2.38 {
stop 192.168.2.243
}
}
}
use-dnsmasq disable
}
dns {
forwarding {
cache-size 150
listen-on eth1
listen-on eth2
}
}
gui {
http-port 80
https-port 443
older-ciphers enable
}
nat {
rule 5010 {
description "masquerade for WAN"
outbound-interface pppoe0
type masquerade
}
}
ssh {
port 22
protocol-version v2
}
}
system {
host-name ubnt
login {
user ubnt {
authentication {
encrypted-password ****************
}
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 {
}
}
offload {
hwnat disable
ipv4 {
forwarding enable
pppoe enable
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone Europe/London
}
vpn {
pptp {
remote-access {
authentication {
local-users {
username james {
password ****************
}
}
mode local
}
client-ip-pool {
start 192.168.10.250
stop 192.168.10.254
}
dns-servers {
server-1 8.8.8.8
server-2 8.8.4.4
}
mtu 1492
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment