The guest OS is running on ip address 192.168.122.217.
I am able to ssh into the machine via this ip address
[kabira@linux ~]$ ssh [email protected]
[email protected]'s password:
But when I forward port 4567 to 192.168.122.217:22 I am not able to
connect, no matter what firewall rule I apply.
I have done the following:
- turned off firewall on openBSD
- added following rules in firewalld
--- forward 4567 to 192.168.122.217 (both tcp and udp)
--- allowed all ports from 192.168.122.217 and 192.168.0.183"
as show below with list-all command:
FedoraServer (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: cockpit dhcpv6-client mdns ssh
ports: 5901/tcp
protocols:
forward: yes
masquerade: no
forward-ports:
port=4567:proto=tcp:toport=22:toaddr=192.168.122.217
port=4567:proto=udp:toport=22:toaddr=192.168.122.217
source-ports:
icmp-blocks:
rich rules:
rule family="ipv4" source address="192.168.0.183" port port="4567" protocol="tcp" accept
rule family="ipv4" source address="192.168.0.183" accept
rule family="ipv4" source address="192.168.122.217" accept
rule family="ipv4" source address="192.168.0.183" port port="4567" protocol="udp" accept
rule family="ipv4" source address="192.168.0.107" port port="5432" protocol="tcp" accept
rule family="ipv4" source address="192.168.0.1/24" port port="4567" protocol="tcp" accept
all I am getting is immediate connection refused when trying to connect to 192.168.0.183 on port 4567.
I also added iptables rules, however that didn't work either.