K
K
kostenelo2018-06-21 09:52:45
Debian
kostenelo, 2018-06-21 09:52:45

How to properly configure networking in Proxmox on a Hetzner EX41 dedicated server?

There is a dedicated Hetzner EX41 server with one Intel(R) PRO/1000 network interface. Hetzner issues one main IPv4 to it, as well as an IPv6 /64 network.
Debian 9.3 + Proxmox 5.1 is installed on the server from ready-made Hetzner images via installimage (I just disabled lvm disk partitioning).
A guest Windows Server 2016 was created through the Proxmox web interface, a virtual network interface was created in NAT mode. Windows Server runs a terminal server, on which 10..15 people perform regular office work every day. This is the main purpose of the server.
The host has the following interface:
auto enp0s31f6
iface enp0s31f6 inet static
address ABC90
netmask 255.255.255.192
gateway ABC65
up route add -net ABC64 netmask 255.255.255.192 gw ABC65 dev enp0s31f6
# route ABC64/26 via ABC65
NAT mode virtual network interface does not appear in /etc/network/interfaces . Everything is emulated by QEMU - guest Windows gets ip 10.0.2.15. (It is curious that if you disable IPv6 support in the properties of the virtual adapter of the guest machine, then the Internet on it disappears).
Forwarded the RDP port qm set 100 -args "--redir tcp:3389::3389" and began to access the guest machine by the IP address of the host.
This is my first experience with Proxmox, it worked mainly through the web interface and, by and large, everything "configured itself".
However, one significant problem arose: work with Yandex mail is very unstable. Outlook (tried also by other clients) freezes, sometimes sends emails very slowly (tens of minutes or hours). Analysis of the logs shows that Yandex servers are disconnecting. Working with mail directly from the office (not on a remote server) does not raise any questions. Moreover, remotely, mail can work normally all day, or it can “slow down” all day. I suspect that the matter is in the "clumsy" traffic routing of Proxmox (QEMU) in NAT mode and the peculiarities of the operation of Yandex mail servers.
Help with questions:
1. Articles about configuring Proxmox often mention additional IP addresses associated with virtual machines. What is the advantage of a separate IPv4 address? Is it possible to set up a full and reliable operation without an additional IP address for the guest machine?
2. What kind of networking Bridge mode / NAT mode / Routed mode (the gateway is one of the virtual machines.) is most suitable for my case? Additional guest machines are possible, but not required.
3. Why is the route table added by ABC64/26 via ABC65 ? because I have one ABC90 address and it will send packets to the ABC65 gateway anyway?
Z.Y. read https://wiki.hetzner.de/index.php/Proxmox_VE/enbut didn't help much. It is clear that a separate mac-address is needed for Bridge Mode (and it is given out along with an additional IP, right?) For NAT Mode, it seems that it is not needed or is it a matter of course?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kostenelo, 2018-07-09
@kostenelo

Understood.
For this, two things were needed:
1. A general understanding of how to organize the connection correctly. Everything is well described in https://pve.proxmox.com/wiki/Network_Configuration
for the case with one public IP, Masquerading (NAT) with iptables
2 is suitable. Detailed technical description of the implementation with nuances for Hetzner. For me, https://e-tel.eu/2017/07/25/deploy-proxmox-hetzner...
Instead of an "Internet" network card, you need to make a bridge with the same settings and port to this very card. And for guest systems, make a second bridge with POSTROUTING, MASQUERADE and bridge_ports none

P
Puma Thailand, 2018-06-21
@opium

Forward one port iptables and nat for local ip and do it

G
graph zero, 2019-03-25
@hiem5

kostenelo here about proxmox in Russian, okay?)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question