primeon
Goto Top

UFW Windows 11- 2 Netzwerkarten Hyper-V

Guten morgen,

ich habe auf meinem Windows 11 eine Nested Virtualization Hyper-V mit Proxmox.
Auf diesem wurde ein internes Netzwerk eingerichtet mit einer OPNSENSE! "siehe Bild".

Das läuft sehr gut. Im Rechner selbst gibt es zwei Netzwerkkarten.
Nun habe ich auf dem Proxmox selbst die UFW am laufen, mit folgenden Regeln.

ufw default deny incoming
ufw default deny  outgoing
-------------------------------------------------------------------------------------------
Windows 11 Hyper-V
ufw allow from 192.168.50.245 to any port 443 proto tcp
ufw allow from 192.168.50.245 to any port 80 proto tcp
ufw allow from 192.168.50.245 to any port 22 proto tcp
ufw allow from 192.168.50.245 to any port 8006 proto tcp

--------------------------------------------------------------------------------------------
ufw enable && ufw default deny && ufw logging on

da habe ich von meinem Rechner aus, auf dem der HYPER-V mit Proxmox installiert wurde, keinen ZUGRIFF?!

Also hatte ich einen weiteren Rechner im Netzwerk in der UFW aufgenommen! Dieser hat nur eine Netzwerkkarte.

Rechner 2 
ufw allow from 192.168.50.17 to any port 443 proto tcp
ufw allow from 192.168.50.17 to any port 80 proto tcp
ufw allow from 192.168.50.17 to any port 22 proto tcp
ufw allow from 192.168.50.17 to any port 8006 proto tcp
--------------------------------------------------------------------------------------------------


root@pve:~# ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), deny (outgoing), deny (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
443/tcp                    ALLOW IN    192.168.50.17
80/tcp                     ALLOW IN    192.168.50.17
22/tcp                     ALLOW IN    192.168.50.17
8006/tcp                   ALLOW IN    192.168.50.17

kein Zugriff?
443/tcp                    ALLOW IN    192.168.50.245
80/tcp                     ALLOW IN    192.168.50.245
22/tcp                     ALLOW IN    192.168.50.245
8006/tcp                   ALLOW IN    192.168.50.245

OK, diese Regel klappt "192.168.50.17"! Ich kann aber vom Windows 11 Rechner den Proxmox anpingen, "siehe Bild" aber ich habe keinen Zugriff auf den Proxmox.

Der Windows Rechner selbst hat eine feste IP! Der Proxmox die
192.168.50.140

Ich vermute, dass mir der Switch vom Hyper-V reinhaut. Hat jemand einen Rat?

Proxmox NIC
Hier muss internes Netzwerk gewählt werden.

Proxmox HOST
Anlegen dann 
Set-VMProcessor -VMName pve -ExposeVirtualizationExtensions $true
Set-VMNetworkAdapter -MacAddressSpoofing On



Netzwerk Proxmox

auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
auto vmbr0
iface vmbr0 inet static
address 192.168.50.140/24
 gateway 192.168.50.253
bridge-ports eth0
bridge-stp off
bridge-fd 0
#zone-intern
---------------------------------------------------------------------
auto vmbr1
iface vmbr1 inet static
address  192.168.1.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 '192.168.1.0/24' -o vmbr0 -j MASQUERADE  
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE  

root@pve:~# iptables -L -v -n | grep 192.168.50.17
    0     0 ACCEPT     6    --  *      *       192.168.50.17        0.0.0.0/0            tcp dpt:443
    0     0 ACCEPT     6    --  *      *       192.168.50.17        0.0.0.0/0            tcp dpt:80
    1    52 ACCEPT     6    --  *      *       192.168.50.17        0.0.0.0/0            tcp dpt:22
   33  1716 ACCEPT     6    --  *      *       192.168.50.17        0.0.0.0/0            tcp dpt:8006

root@pve:~# iptables -L -v -n | grep 192.168.50.245
    0     0 ACCEPT     6    --  *      *       192.168.50.245       0.0.0.0/0            tcp dpt:443
    0     0 ACCEPT     6    --  *      *       192.168.50.245       0.0.0.0/0            tcp dpt:80
    0     0 ACCEPT     6    --  *      *       192.168.50.245       0.0.0.0/0            tcp dpt:22
    0     0 ACCEPT     6    --  *      *       192.168.50.245       0.0.0.0/0            tcp dpt:8006


vielen Dank.
netzwer2k
netzwerk
netzwerk3

Content-Key: 8976293692

Url: https://administrator.de/contentid/8976293692

Printed on: June 21, 2024 at 20:06 o'clock