diff --git a/proxmox/lxc/103.conf b/proxmox/lxc/103.conf new file mode 100644 index 0000000..4603734 --- /dev/null +++ b/proxmox/lxc/103.conf @@ -0,0 +1,12 @@ +arch: amd64 +cores: 1 +features: nesting=1 +hostname: pihole +memory: 512 +nameserver: 8.8.8.8 +net0: name=eth0,bridge=vmbr1,firewall=0,gw=10.10.1.1,hwaddr=BC:24:11:D6:DD:FF,ip=10.10.1.2/24,type=veth +onboot: 1 +ostype: debian +rootfs: local-zfs:subvol-103-disk-0,size=4G +swap: 0 +unprivileged: 1 diff --git a/proxmox/lxc/104.conf b/proxmox/lxc/104.conf new file mode 100644 index 0000000..12abf6b --- /dev/null +++ b/proxmox/lxc/104.conf @@ -0,0 +1,14 @@ +arch: amd64 +cores: 1 +hostname: traefik +memory: 256 +nameserver: 10.10.1.2 +net0: name=eth0,bridge=vmbr1,firewall=1,gw=10.10.1.1,hwaddr=BC:24:11:8E:D3:36,ip=10.10.1.3/24,type=veth +onboot: 1 +ostype: debian +rootfs: local-zfs:subvol-104-disk-0,size=2G +swap: 0 +unprivileged: 1 + +[pve:pending] +nameserver: 8.8.8.8 diff --git a/proxmox/network-interfaces b/proxmox/network-interfaces new file mode 100644 index 0000000..f244e6c --- /dev/null +++ b/proxmox/network-interfaces @@ -0,0 +1,54 @@ +auto lo +iface lo inet loopback + +iface nic0 inet manual + +auto vmbr0 +iface vmbr0 inet static + address 192.168.1.10/24 + gateway 192.168.1.1 + bridge-ports nic0 + bridge-stp off + bridge-fd 0 + post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to-destination 10.10.1.3:80 + post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to-destination 10.10.1.3:443 + post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to-destination 10.10.1.3:80 + post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to-destination 10.10.1.3:443 + post-up iptables -t nat -A PREROUTING -i vmbr0 -p udp --dport 53 -j DNAT --to-destination 10.10.1.2:53 + post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 53 -j DNAT --to-destination 10.10.1.2:53 + post-up iptables -t nat -A POSTROUTING -p udp -d 10.10.1.2 --dport 53 -j MASQUERADE + post-up iptables -t nat -A POSTROUTING -p tcp -d 10.10.1.2 --dport 53 -j MASQUERADE + post-down iptables -t nat -D PREROUTING -i vmbr0 -p udp --dport 53 -j DNAT --to-destination 10.10.1.2:53 + post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 53 -j DNAT --to-destination 10.10.1.2:53 + post-down iptables -t nat -D POSTROUTING -p udp -d 10.10.1.2 --dport 53 -j MASQUERADE + post-down iptables -t nat -D POSTROUTING -p tcp -d 10.10.1.2 --dport 53 -j MASQUERADE + + +source /etc/network/interfaces.d/* + +auto vmbr1 +iface vmbr1 inet static + address 10.10.1.1/24 + bridge-ports none + bridge-stp off + bridge-fd 0 + post-up iptables -t nat -A POSTROUTING -s 10.10.1.0/24 -o vmbr0 -j MASQUERADE + post-down iptables -t nat -D POSTROUTING -s 10.10.1.0/24 -o vmbr0 -j MASQUERADE + +auto vmbr2 +iface vmbr2 inet static + address 10.10.2.1/24 + bridge-ports none + bridge-stp off + bridge-fd 0 + post-up iptables -t nat -A POSTROUTING -s 10.10.2.0/24 -o vmbr0 -j MASQUERADE + post-down iptables -t nat -D POSTROUTING -s 10.10.2.0/24 -o vmbr0 -j MASQUERADE + +auto vmbr3 +iface vmbr3 inet static + address 10.10.3.1/24 + bridge-ports none + bridge-stp off + bridge-fd 0 + post-up iptables -t nat -A POSTROUTING -s 10.10.3.0/24 -o vmbr0 -j MASQUERADE + post-down iptables -t nat -D POSTROUTING -s 10.10.3.0/24 -o vmbr0 -j MASQUERADE