Files
configpolicy/roles/dch-gw/templates/forward.nft.j2
Dustin C. Hatch f8641cb912 dch-gw: Host Pyrocufflink VPN locally
This commit adjusts the firewall and networking configuration on dc0 to
host the Pyrocufflink remote access IPsec VPN locally instead of
forwarding it to the internal VPN server.
2018-05-20 13:23:20 -05:00

25 lines
846 B
Django/Jinja

{#- vim: set sw=4 ts=4 sts=4 et : #}
table inet filter {
set vpn_subnets {
type ipv4_addr
flags interval
elements = {
172.31.0.64/28,
{% for prefix in firemon_networks %}
{{ prefix }},
{% endfor %}
}
}
chain forward {
ct state established,related accept
iifname {{ dch_networks.guest.router_iface }} oif != {{ internet_iface }} drop
iif != {{ internet_iface }} oifname {{ dch_networks.guest.router_iface }} drop
iif != {{ internet_iface }} oif != {{ internet_iface }} counter accept
iif {{ internet_iface }} ip saddr @vpn_subnets counter accept
iif != {{ internet_iface }} ip daddr @vpn_subnets counter accept
tcp dport smtp counter reject with icmpx type host-unreachable
oif {{ internet_iface }} accept
}
}