Good evening, I am interested in being able to connect two Proxmox servers to each other and that the VMs of both can be seen no matter where they are. The idea is that they work as if they were connected under the same switch, but the problem is that they are connected P2P.
Both nodes are seen via eno1.
I am interested in whether the 192.168.10.X network of both nodes can be one.
How can I do this?
This is my configuration:
Node 1
Node 2
Both nodes are seen via eno1.
I am interested in whether the 192.168.10.X network of both nodes can be one.
How can I do this?
This is my configuration:
Node 1
Bash:
auto lo
iface lo inet loopback
iface enp1s0 inet manual
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address xxx.43.xxx.110/30
gateway xxx.43.xxx.xxx
bridge-ports enp1s0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4049
#IP Public
auto vmbr2
iface vmbr2 inet static
address 192.168.20.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.20.0/24' -o vmbr1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.20.0/24' -o vmbr1 -j MASQUERADE
#Intranet
auto vmbr1
iface vmbr1 inet static
address 192.168.10.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '192.168.10.1/24' -o vmbr0 -j SNAT --to-source xxx.43.xxx.110
post-down iptables -t nat -D POSTROUTING -s '192.168.10.1/24' -o vmbr0 -j SNAT --to-source xxx.43.xxx.110
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
post-up iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
post-down iptables -D FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
post-up iptables -t nat -A POSTROUTING -o vmbr0 -j SNAT --to-source 179.43.118.110
post-down iptables -t nat -D POSTROUTING -o vmbr0 -j SNAT --to-source 179.43.118.110
ip-forward on
#Internet
Bash:
auto lo
iface lo inet loopback
iface enp2s0 inet manual
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet static
address XXX.58.XXX.218/30
gateway XXX.58.XXX.xxx
bridge-ports enp2s0
bridge-stp off
bridge-fd 0
#IP Public
auto vmbr1
iface vmbr1 inet static
address 192.168.10.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up iptables -t nat -A POSTROUTING -s '192.168.10.1/24' -o vmbr0 -j SNAT --to-source XXX.58.XXX.218
post-down iptables -t nat -D POSTROUTING -s '192.168.10.1/24' -o vmbr0 -j SNAT --to-source XXX.58.XXX.218
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
post-up iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
post-down iptables -D FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
post-up iptables -t nat -A POSTROUTING -o vmbr0 -j SNAT --to-source 200.58.108.218
post-down iptables -t nat -D POSTROUTING -o vmbr0 -j SNAT --to-source 200.58.108.218
ip-forward on
#Internet
auto vmbr2
iface vmbr2 inet static
address 192.168.20.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.20.0/24' -o vmbr2 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.20.0/24' -o vmbr2 -j MASQUERADE
#Internet
auto vmbr3
iface vmbr3 inet static
address 10.88.8.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 '10.88.8.0/24' -o vmbr3 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.88.8.0/24' -o vmbr3 -j MASQUERADE
#Intranet App1