Hey! Hetzner has 2 Dedics running ubuntu 20.04. Each has 2 ubuntu virtual machines. In my personal account, I raised a vswitch to combine machines. There are no additional ip. It doesn’t seem to be needed for a local network. Both had vbox. The network configuration is as follows:
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
addresses:
- <ip-хетзнер>/32
routes:
- on-link: true
to: 0.0.0.0/0
via: 46.4.96.33 <шлюз хетзнер>
gateway6: fe80::1
nameservers:
addresses:
- 185.12.64.1
- 185.12.64.2
vlans:
enp0s31f6.4000:
id: 4000
link: enp0s31f6
mtu: 1400
addresses:
- 192.168.100.2/24
The second one is also the same, only ip vlan 192.168.100.3/24
Everything worked between them. Pings between all omegle.site/ machines worked. iptables put everything ACCEPT and plus only:
# iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33335 -j DNAT --to-destination 192.168.100.46:33335
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33337 -j DNAT --to-destination 192.168.100.47:33337
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33337 -j DNAT --to-destination 192.168.100.138:33338
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33337 -j DNAT --to-destination 192.168.100.139:33339
-A POSTROUTING -s 192.168.100.0/24 -j MASQUERADE
Everything worked. Then I decided to switch to promox. I put it on the second server, the first one is still on vbox
The promox has not been updated. It costs from the cpstest box installimage. Create an additional routing table: echo "1 vswitch" >> /etc/iproute2/rt_tables. Now on the promox on the host the network is like this:
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual
auto vmbr0
iface vmbr0 inet static
address <хетзнер ip>
netmask 255.255.255.0
gateway <хетзнер шлюз>
bridge_ports enp0s31f6
bridge_stp off
bridge_fd 0
iface enp0s31f6.4000 inet manual
auto vmbr4000
iface vmbr4000 inet manual
bridge_ports enp0s31f6.4000
bridge_stp off
bridge_fd 0
mtu 1400
On ubuntu virtual machines I do this:
network:
version: 2
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.100.5/24]
mtu 1400
But there is no ping between servers. I checked all possible combinations.
On debian, with this configuration, there is also no ping from the host:
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp0s31f6
iface enp0s31f6 inet static
address <ip-хетзнер>/26
gateway 138.201.55.193
up route add -net 138.201.55.192 netmask 255.255.255.192 gw 138.201.55.193 dev enp0s31f6
route 138.201.55.192/26 via 138.201.55.193 iface enp0s31f6 inet6 static
address 2a01:4f8:172:10de::2/64
gateway fe80::1
auto enp0s31f6.4000
iface enp0s31f6.4000 inet static
address 192.168.100.5/24
id 4000
mtu 1400
How do I configure debian to communicate between hosts? Thanks!
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
addresses:
- <ip-хетзнер>/32
routes:
- on-link: true
to: 0.0.0.0/0
via: 46.4.96.33 <шлюз хетзнер>
gateway6: fe80::1
nameservers:
addresses:
- 185.12.64.1
- 185.12.64.2
vlans:
enp0s31f6.4000:
id: 4000
link: enp0s31f6
mtu: 1400
addresses:
- 192.168.100.2/24
The second one is also the same, only ip vlan 192.168.100.3/24
Everything worked between them. Pings between all omegle.site/ machines worked. iptables put everything ACCEPT and plus only:
# iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33335 -j DNAT --to-destination 192.168.100.46:33335
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33337 -j DNAT --to-destination 192.168.100.47:33337
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33337 -j DNAT --to-destination 192.168.100.138:33338
-A PREROUTING -i enp0s31f6 -p tcp -m tcp --dport 33337 -j DNAT --to-destination 192.168.100.139:33339
-A POSTROUTING -s 192.168.100.0/24 -j MASQUERADE
Everything worked. Then I decided to switch to promox. I put it on the second server, the first one is still on vbox
The promox has not been updated. It costs from the cpstest box installimage. Create an additional routing table: echo "1 vswitch" >> /etc/iproute2/rt_tables. Now on the promox on the host the network is like this:
auto lo
iface lo inet loopback
iface enp0s31f6 inet manual
auto vmbr0
iface vmbr0 inet static
address <хетзнер ip>
netmask 255.255.255.0
gateway <хетзнер шлюз>
bridge_ports enp0s31f6
bridge_stp off
bridge_fd 0
iface enp0s31f6.4000 inet manual
auto vmbr4000
iface vmbr4000 inet manual
bridge_ports enp0s31f6.4000
bridge_stp off
bridge_fd 0
mtu 1400
On ubuntu virtual machines I do this:
network:
version: 2
ethernets:
enp0s3:
dhcp4: false
addresses: [192.168.100.5/24]
mtu 1400
But there is no ping between servers. I checked all possible combinations.
On debian, with this configuration, there is also no ping from the host:
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto enp0s31f6
iface enp0s31f6 inet static
address <ip-хетзнер>/26
gateway 138.201.55.193
up route add -net 138.201.55.192 netmask 255.255.255.192 gw 138.201.55.193 dev enp0s31f6
route 138.201.55.192/26 via 138.201.55.193 iface enp0s31f6 inet6 static
address 2a01:4f8:172:10de::2/64
gateway fe80::1
auto enp0s31f6.4000
iface enp0s31f6.4000 inet static
address 192.168.100.5/24
id 4000
mtu 1400
How do I configure debian to communicate between hosts? Thanks!
Last edited: