Hello,
i have a dedicated Server at Hetzner with one Public IP and want to get the following Setup
Use the Public IP for every Windows Server VM i setup
Beeing able to have internet connection on all VMs
Beeing able to RDP to all VMs with IPORT
I spend the day reading and tryd different things with out a success, thats my interfaces:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
iface eth0 inet static
address 144.xx.xx.55
netmask 255.255.255.224
gateway 144.xx.xx.33
up route add -net 144.xx.xx.32 netmask 255.255.255.224 gw 144.xx.xx.33 dev eth0
iface eth0 inet6 static
address 2a01:xxx:xxx:xxx::x
netmask 64
gateway fe80::1
auto vmbr0
iface vmbr0 inet static
address 144.xx.xx.55
netmask 255.255.255.224
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
# /etc/network/interfaces:
auto vmbr2
iface vmbr2 inet static
address 10.21.21.254
netmask 255.255.255.0
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.21.21.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.21.21.0/24' -o vmbr0 -j MASQUERADE
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 10.21.21.5:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 10.21.21.5:3389
eth0 was added as default with the Public IP and Gateway/Netmask during install from Hetzner.
I added vmbr0 using my Public IP and the netmask provided from Hetzner, then i added vmbr2 as shown above to forward port 3389 to 2222.
I used vmbr2 as Network for my VM.
In my Windows VM i used as IP 10.21.21.2 and as Gateway 10.21.21.1 but i also tryd using the gateway from hetzner without a success.
I hope someone can point me in the right direction how to setup that whole thing.
Thanks
i have a dedicated Server at Hetzner with one Public IP and want to get the following Setup
Use the Public IP for every Windows Server VM i setup
Beeing able to have internet connection on all VMs
Beeing able to RDP to all VMs with IPORT
I spend the day reading and tryd different things with out a success, thats my interfaces:
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
iface lo inet6 loopback
auto eth0
iface eth0 inet static
address 144.xx.xx.55
netmask 255.255.255.224
gateway 144.xx.xx.33
up route add -net 144.xx.xx.32 netmask 255.255.255.224 gw 144.xx.xx.33 dev eth0
iface eth0 inet6 static
address 2a01:xxx:xxx:xxx::x
netmask 64
gateway fe80::1
auto vmbr0
iface vmbr0 inet static
address 144.xx.xx.55
netmask 255.255.255.224
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
# /etc/network/interfaces:
auto vmbr2
iface vmbr2 inet static
address 10.21.21.254
netmask 255.255.255.0
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.21.21.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.21.21.0/24' -o vmbr0 -j MASQUERADE
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 10.21.21.5:3389
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 10.21.21.5:3389
eth0 was added as default with the Public IP and Gateway/Netmask during install from Hetzner.
I added vmbr0 using my Public IP and the netmask provided from Hetzner, then i added vmbr2 as shown above to forward port 3389 to 2222.
I used vmbr2 as Network for my VM.
In my Windows VM i used as IP 10.21.21.2 and as Gateway 10.21.21.1 but i also tryd using the gateway from hetzner without a success.
I hope someone can point me in the right direction how to setup that whole thing.
Thanks