Szukałem i nie byłem w stanie znaleźć niczego, jak rozwiązać ten problem. Próbuję skonfigurować przekierowanie portów do maszyny wirtualnej (qemu) na serwerze CentOS 7.
- Wiązanie, aby przekazać cokolwiek przychodzącego na 8050 na 192.168.100.50:8080.
- Próbowałem firewall-config i szukałem w Internecie od kilku dni.
Nie mogę znaleźć nikogo, kto byłby w stanie go rozwiązać bez powrotu do iptables.
System operacyjny hosta:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether f0:4d:a2:09:c9:87 brd ff:ff:ff:ff:ff:ff
inet XXX.XXX.49.99/29 brd XXX.XXX.49.103 scope global em1
valid_lft forever preferred_lft forever
inet6 :::f24d:a2ff:fe09:c987/64 scope link
valid_lft forever preferred_lft forever
6: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 52:54:00:b8:57:fb brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
7: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 500
link/ether 52:54:00:b8:57:fb brd ff:ff:ff:ff:ff:ff
21: virbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 52:54:00:35:6f:b2 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.1/24 brd 192.168.100.255 scope global virbr1
valid_lft forever preferred_lft forever
22: virbr1-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr1 state DOWN qlen 500
link/ether 52:54:00:35:6f:b2 brd ff:ff:ff:ff:ff:ff
34: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr1 state UNKNOWN qlen 500
link/ether fe:54:00:32:25:24 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fe32:2524/64 scope link
valid_lft forever preferred_lft forever
35: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master virbr1 state UNKNOWN qlen 500
link/ether fe:54:00:6c:bf:44 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc54:ff:fe6c:bf44/64 scope link
valid_lft forever preferred_lft forever
VM:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 52:54:00:6c:bf:44 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.50/24 brd 192.168.100.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fe6c:bf44/64 scope link
valid_lft forever preferred_lft forever
ifconfig
(lub ip address show
) zarówno dla swojego gościa, jak i dla swojego hosta VM.