From 1dc669c6a813e70ae090d3f85e8c2202dc729c4f Mon Sep 17 00:00:00 2001 From: Sergey Mazein <37579301+semalis@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:15:07 +0300 Subject: [PATCH] Utils --- Proxmox/README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/Proxmox/README.md b/Proxmox/README.md index d070003..68d9c4c 100644 --- a/Proxmox/README.md +++ b/Proxmox/README.md @@ -99,6 +99,61 @@ post-up echo 1 > /proc/sys/net/ipv4/ip_forward post-up iptables -t nat -A POSTROUTING -s '192.168.100.0/24' -o enp7s0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '192.168.100.0/24' -o enp7s0 -j MASQUERADE +post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1 +post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1 +``` + +## OVH + +```bash +iface lo inet loopback + +iface eno1 inet manual + +iface enp3s0f1 inet manual + +auto vmbr0 +iface vmbr0 inet static + address 167.114.172.204/24 + gateway 167.114.172.254 + bridge-ports eno1 + bridge-stp off + bridge-fd 0 + hwaddress AC:1F:6B:05:B7:84 + +iface vmbr0 inet6 static + address 2607:5300:60:73cc::/64 + gateway 2607:5300:60:73ff:ff:ff:ff:ff + +#auto vmbr100 +#iface vmbr100 inet static +# address 192.168.100.0/24 +# bridge-ports none +# bridge-stp off +# bridge-fd 0 + + + +#auto vmbr0 +#iface vmbr0 inet static +# address 167.114.172.204/24 +# gateway 167.114.172.254 +# bridge-ports eno1 +# bridge-stp off +# bridge-fd 0 +# hwaddress AC:1F:6B:05:B7:84 + +auto vmbr100 +iface vmbr100 inet static + address 192.168.100.1/24 + 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 '192.168.100.0/24' -o vmbr0 -j MASQUERADE + post-down iptables -t nat -D POSTROUTING -s '192.168.100.0/24' -o vmbr0 -j MASQUERADE +#NAT + post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1 post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1 ``` \ No newline at end of file