Skip to content

Instantly share code, notes, and snippets.

@adamcooke
Created January 26, 2015 11:47
Show Gist options
  • Save adamcooke/a5f356b4de7254430052 to your computer and use it in GitHub Desktop.
Save adamcooke/a5f356b4de7254430052 to your computer and use it in GitHub Desktop.
Full EdgeRouter Config for my home network
firewall {
all-ping enable
broadcast-ping disable
group {
ipv6-network-group ipv6-allowed-networks {
ipv6-network 2a00:67a0:a:6::/64
ipv6-network 2a00:67a0:a:2::138/128
ipv6-network 2a00:67a0:a:13::/64
}
network-group allowed-networks {
network 10.0.2.0/24
network 185.44.252.100/31
}
}
ipv6-name home-ipv6 {
default-action drop
rule 10 {
action accept
description "allow established"
state {
established enable
related enable
}
}
rule 20 {
action accept
description "allow trusted networks"
source {
group {
ipv6-network-group ipv6-allowed-networks
}
}
}
rule 30 {
action accept
description "allow icmp"
icmpv6 {
}
protocol icmpv6
}
}
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
modify pppoe-out {
rule 1 {
action modify
modify {
tcp-mss 1452
}
protocol tcp
tcp {
flags SYN
}
}
}
name home-ipv4 {
default-action drop
rule 10 {
action accept
description "allow established"
state {
established enable
related enable
}
}
rule 20 {
action accept
description "allow trusted networks"
destination {
}
source {
group {
network-group allowed-networks
}
}
}
}
receive-redirects disable
send-redirects enable
source-validation disable
syn-cookies enable
}
interfaces {
ethernet eth0 {
address 10.0.4.1/24
address 2001:470:1f1d:5::1/64
duplex auto
firewall {
out {
ipv6-name home-ipv6
name home-ipv4
}
}
ipv6 {
router-advert {
default-preference high
managed-flag true
max-interval 10
other-config-flag true
prefix 2001:470:1f1d:5::/64 {
}
radvd-options "RDNSS 2001:470:1f1d:5::1 {};"
send-advert true
}
}
speed auto
}
ethernet eth1 {
duplex auto
pppoe 0 {
default-route auto
firewall {
out {
modify pppoe-out
}
}
mtu 1492
name-server auto
password PASSWORD
user-id USERNAME
}
speed auto
}
ethernet eth2 {
duplex auto
speed auto
}
loopback lo {
}
openvpn vtun0 {
config-file /config/auth/ovpn.conf
}
tunnel tun0 {
address 2001:470:1f1c:5::2/64
description "HE.NET IPv6 Tunnel"
encapsulation sit
local-ip 0.0.0.0
remote-ip 216.66.88.98
}
}
protocols {
static {
interface-route 185.22.209.201/32 {
next-hop-interface pppoe0 {
}
}
interface-route6 ::/0 {
next-hop-interface tun0 {
}
}
}
}
service {
dhcp-server {
disabled false
hostfile-update disable
shared-network-name home {
authoritative disable
subnet 10.0.4.0/24 {
default-router 10.0.4.1
dns-server 10.0.4.1
lease 86400
start 10.0.4.20 {
stop 10.0.4.200
}
}
}
}
dns {
dynamic {
interface pppoe0 {
service dyndns {
host-name adamcooke-1.tunnel.tserv1.lon2.ipv6.he.net
login USERNAME
password PASSWORD
server ipv4.tunnelbroker.net
}
}
}
forwarding {
cache-size 150
listen-on eth0
name-server 8.8.8.8
name-server 141.1.1.1
}
}
nat {
rule 5000 {
outbound-interface pppoe0
type masquerade
}
}
ssh {
port SSHPORT
protocol-version v2
}
}
system {
domain-name adamcooke.io
host-name homerouter
login {
user adam {
authentication {
encrypted-password ENCRYPTED-PASSWORD
public-keys [email protected] {
key AAAAB3NzaC1yc2EAAAABIwAAAQEAvtNKd/IHPXiiZNLftQ1f487HR1uMjec4/1S3aoBKVE2XGd6tF8HgC3jitmP4LFyzn0AsLPK0Wf0A6zh9qQxk4qtquDEfHblfd20ws7DSKlqweZwIbBqIHeIw26FEOJiurp2i5dAGZcHq4kYPgJn14zvX6mSd3rcPYk+6PdUNdI5eDR0pFuW+VG37J6+7gN8PAXDhieCh9YcX2aqiJD09NZZgMoxK2FDw/7gj3oBW9G4Dff7C/m6ZjtlPb61d1HUmNkPJNq9cf04mKrWU9NsXX8gj7wSnmQouYTec9Gv57Z5iRAd5Qa627f9Ta6rsO89aykMFcvle/XY5Hkc3BcIxPQ==
type ssh-rsa
}
}
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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment