Hi all,
i have configured a port forwarding for ssh but receiving connection refused. Here is my topology
VM(redhat)-----------------VM(Centos)----------------KVM(Centos)
192.168.4.2 192.168.4.1 192.168.122.1 192.168.122.2
ping from KVM(Centos) to VM(Redhat) is working. I have configured NAT on VM(Centos) for External zone and Proxy ARP on virbr0 interface.
[root@rh2 ~]# ping 192.168.4.2
PING 192.168.4.2 (192.168.4.2) 56(84) bytes of data.
64 bytes from 192.168.4.2: icmp_seq=1 ttl=63 time=0.790 ms
64 bytes from 192.168.4.2: icmp_seq=2 ttl=63 time=1.94 ms
64 bytes from 192.168.4.2: icmp_seq=3 ttl=63 time=2.88 ms
^C
--- 192.168.4.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.790/1.871/2.881/0.855 ms
Furtermore port forwarding is configured as following on VM(Centos)
[root@rh1 ~]# firewall-cmd --zone=external --list-all
external (active)
target: default
icmp-block-inversion: no
interfaces: ens37
sources:
services: ssh
ports:
protocols:
masquerade: yes
forward-ports: port=22
roto=tcp:toport=:toaddr=192.168.122.2
sourceports:
icmp-blocks:
rich rules:
However I get connection refused.
Any idea why?
[root@host1 ~]# ssh 192.168.4.1
ssh: connect to host 192.168.4.1 port 22: Connection refused
[root@host1 ~]#
Am I missing sth. in configuration?
Many thanks!