aboutsummaryrefslogtreecommitdiff
path: root/personal_infra/puppet/modules/proxmox/templates/interfaces.epp
blob: 809c7dc4cc73f8246e2c0b4b959753dbf1ae5a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
	address <%= $network['ip'] %>
	netmask <%= $network['netmask'] %>
	gateway <%= $network['gateway'] %>

auto vmbr0
iface vmbr0 inet static
	address <%= $network['proxmox']['ip'] %>
	netmask <%= $network['proxmox']['netmask'] %>
	bridge_ports none
	bridge_stp off
	bridge_fd 0
	post-up   echo 1 > /proc/sys/net/ipv4/ip_forward
	post-up   iptables -t nat -A POSTROUTING -s '<%= $network['proxmox']['network'] %>' -o eno1 -j MASQUERADE
	post-down iptables -t nat -D POSTROUTING -s '<%= $network['proxmox']['network'] %>' -o eno1 -j MASQUERADE
<%= $network['proxmox']['extra_interfaces_content'] %>