Proxmox

Ansible

Network

Example for hetzner with routed networking

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
### Hetzner Online GmbH installimage

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eth0
iface eth0 inet static
address <public-address>
netmask 255.255.255.224
gateway 176.9.150.33
# route 176.9.150.32/27 via 176.9.150.33
up route add -net 176.9.150.32 netmask 255.255.255.224 gw 176.9.150.33 dev eth0

### CUSTOM CONFIG ###
auto vmbr0
iface vmbr0 inet static
address <internal-net-address>
netmask 255.255.255.0
gateway <public-address>
bridge_ports none
bridge_stp off
bridge_fd 0
up route add -net 176.9.150.32 netmask 255.255.255.224 gw 176.9.150.33 dev vmbr0

Comments

⬆︎TOP