0

I cannot to ssh or nslookup to this machine vm1 that has the ip 192.168.56.2 from ferrari which has the ip 172.45.20.3. I do not know why, but I am able to ssh to the 192.168.56.2 from my host machine. Iptables is disabled for testing purposes on 192.168.56.2 and 172.45.20.3. I can also perform reverse lookups for 172.45.20.3 from vm1, but I cannot do forward lookups using a hostname.

[root@ferrari ~]# nslookup vm1 192.168.56.2
;; connection timed out; trying next origin
;; connection timed out; trying next origin
;; connection timed out; no servers could be reached
ssh: connect to host 192.168.56.2 port 22: Connection refused

vm1

[root@vm1 ~]# nslookup ferrari 172.45.20.3
Server:     172.45.20.3
Address:    172.45.20.3#53

Name:   ferrari.luxury.auto.ops
Address: 172.45.20.3

[root@vm1 ~]# nslookup 172.45.20.3
Server:     192.168.56.2
Address:    192.168.56.2#53

Non-authoritative answer:
3.20.45.172.in-addr.arpa    name = ferrari.luxury.auto.ops.

Authoritative answers can be found from:
20.45.172.in-addr.arpa  nameserver = ferrari.luxury.auto.ops.
ferrari.luxury.auto.ops internet address = 172.45.20.3

[root@vm1 ~]# host 172.45.20.3
3.20.45.172.in-addr.arpa domain name pointer ferrari.luxury.auto.ops.
  • is ip forwarding active on the server doing routing? – Rui F Ribeiro Mar 18 '18 at 21:30
  • @RuiFRibeiro Yes, both networks allow traffic through the forward chain. – Ovie Mar 18 '18 at 21:40
  • Which machine has which address? Which one can't you ssh to? From where? You've a name "vm1". How does that fit in to the situation - is it Ferrari by another name? If you have virtualisation please tell us, and include how you have set up the host and guest networks. – roaima Mar 18 '18 at 21:52
  • Is your DNS server listening to all interfaces? If it's a VM, is the virtualization host performing NAT on the VM interface? – ErikF Mar 18 '18 at 22:15
  • @ErikF, I apologize for the late reply, can I go to named.confand set listen-on { any;}. To do NAT, can I also do this rule iptables -t nat -A postroughting -o eth0 -j masquerade? – Ovie Mar 19 '18 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.