X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/blobdiff_plain/295959eafba277994e9f87ff212bc80fe98f78ea..7377aca7bc3d4cfd29e6974c861048db8e1a4161:/local.m4 diff --git a/local.m4 b/local.m4 index 5dfb3a0..821cea9 100644 --- a/local.m4 +++ b/local.m4 @@ -54,6 +54,7 @@ m4_divert(-1) ## 172.29.198.0/24 Untrusted networks. ## .0/25 house wireless net ## .128/28 iodine (IP-over-DNS) network +## .144/28 hippotat (IP-over-HTTP) network ## .160/27 untrusted virtual network ## ## 172.29.199.0/24 Trusted networks. @@ -190,7 +191,7 @@ defhost groove defhost gibson hosttype client - iface eth0.5 unsafe + iface eth0 unsafe ## Colocated networks. defnet jump trusted @@ -206,6 +207,9 @@ defnet colobdry virtual defnet iodine untrusted addr 172.29.198.128/28 via colohub +defnet hippotat untrusted + addr 172.29.198.144/28 + via colohub ## Colocated hosts. defhost fender @@ -231,6 +235,7 @@ defhost jazz iface eth0 jump colo vpn iface eth1 jump colo vpn iface dns0 iodine + iface hippo-svc hippotat iface vpn-+ vpn ## Other networks. @@ -242,7 +247,7 @@ defnet sgo noloop addr 172.16.0.0/12 addr 192.168.0.0/16 via househub colohub -defnet vpn safe +defnet vpn trusted addr 172.29.199.128/27 2001:ba8:1d9:6000::/64 via househub colohub host crybaby 1 ::1:1 @@ -349,6 +354,23 @@ case $forward in ;; esac +m4_divert(82)m4_dnl +###-------------------------------------------------------------------------- +### Check for source routing. + +clearchain check-srcroute + +run iptables -A check-srcroute -g forbidden \ + -m ipv4options --any --flags lsrr,ssrr +run ip6tables -A check-srcroute -g forbidden \ + -m rt + +for c in INPUT FORWARD; do + for m in $from_scary $from_untrusted; do + run ip46tables -A $c -m mark --mark $m/$MASK_FROM -j check-srcroute + done +done + m4_divert(84)m4_dnl ###-------------------------------------------------------------------------- ### Locally-bound packet inspection. @@ -377,7 +399,7 @@ m4_divert(88)m4_dnl openports inbound ## Inspect inbound packets from untrusted sources. -run ip46tables -A inbound -j forbidden +run ip46tables -A inbound -g forbidden run ip46tables -A INPUT -m mark --mark $from_scary/$MASK_FROM -g inbound run ip46tables -A INPUT -m mark --mark $from_untrusted/$MASK_FROM -g inbound