Files
configpolicy/host_vars/gw0/network.yml
Dustin C. Hatch a0a4b91faf roles/dch-gw: Configure the filter table
The *filter* table is responsible for deciding which packets will be
accepted and which will be rejected. It has three chains, which classify
packets according to whether they are destined for the local machine
(input), passing through this machine (forward) or originating from the
local machine (output).

The *dch-gw* role now configures all three chains in this table. For
now, it defines basic rules, mostly based on TCP/UDP destination port:

* Traffic destined for a service hosted by the local machine (DNS, DHCP,
  SSH), is allowed if it does not come from the Internet
* Traffic passing through the machine is allowed if:
  * It is passing between internal networks
  * It is destined for a host on the FireMon network (VPN)
  * It was NATed to in internal host (marked 323)
  * It is destined for the Internet
* Only DHCP, HTTP, and DNS are allowed to originate from the local
machine

This configuration requires an `internet_iface` variable, which
indicates the name of the network interface connected to the Internet
directly.
2018-03-29 10:06:30 -05:00

81 lines
1.6 KiB
YAML

internet_iface: enp4s0
network:
ignore_interfaces:
- '{{ internet_iface }}'
interfaces:
- ifname: enp1s0
enabled: true
master: bond0
mode: none
- ifname: enp2s0
enabled: true
master: bond0
mode: none
- ifname: enp3s0
enabled: true
master: bond0
mode: none
- ifname: bond0
ignore: false
enabled: true
bond_opts:
mode: 802.3ad
miimon: 100
mode: none
- ifname: vlan1
enabled: true
vlan_id: 1
physdev: bond0
mode: manual
addr: 172.31.0.1
prefix: 27
addr6: fd99:8cd7:6528::1
routes:
- prefix: 172.31.0.64/28
nexthop:
- address: 172.31.0.2
- prefix: 192.168.0.0/16
nexthop:
- address: 172.31.0.2
- prefix: 172.28.33.0/24
nexthop:
- address: 172.31.0.2
- ifname: vlan100
enabled: true
vlan_id: 100
physdev: bond0
mode: manual
addr: 172.24.100.1
prefix: 24
- ifname: vlan101
enabled: true
vlan_id: 101
physdev: bond0
mode: manual
addr: 172.31.1.1
prefix: 24
- ifname: vlan30
enabled: true
vlan_id: 30
physdev: bond0
mode: manual
addr: 172.30.0.1
prefix: 26
dhcpcd_send_hostname: false
dhcpcd_ntp_servers: false
dhcpcd_noipv4: true
dhcpcd_noipv6rs: true
dhcpcd_interfaces:
- name: '{{ internet_iface }}'
description: Internet
config:
- ipv4
- noipv4ll
- ipv6rs
- ia_pd 1/::/56
{{ dch_networks.blue.router_iface }}/{{ dch_networks.blue.sla_id }}
{{ dch_networks.red.router_iface }}/{{ dch_networks.red.sla_id }}
{{ dch_networks.jazz.router_iface }}/{{ dch_networks.jazz.sla_id }}