0

I have installed a Red Hat 6 server as a virtual machine in a windows 2012 enterprise edition Hyper-V. The installation is over and I configured the static IP address using GUI tool provided in the top taskbar. The gateway is the IP address of the Virtual Switch. I am able to ping this machine from others. Moreover I can take remote desktop of other windows machine which is another virtual machine. So I assume that the connectivity configuration part on windows server is OK.

PROBLEM: I am not able to SSH to the redhat machine. Even, cannot access any services outside of it.

  • The sshd_config file is correct. Password authentication is allowed. Service is running and listening on port 22(confirmed with netstat).
  • NMAP scan shows port 22 closed(rest of the open ports are- 135,445,2179,3389,49152,49153,49154). I am wondering why these Microsoft ports happen to be opened on this Redhat server.
  • SSH is successful from the server locally.
  • ssh -v as debug mode shows- Connection timed out.
  • tcpdump -i eth0 port 22 doesn't show any incoming packets on interface. Whereas icmp packets are seen coming on interface.
  • Any other packets of telnetting any other port to this server are not seen in TCPDUMP.
  • Firewall is disabled

I've tried all the hits and trial I could find on internet.

UPDATE: I tried to access webpage of redhat from another windows virtual machine which is in same Hyper-V environment


Anyways, what I've figured till now is that this is some problem between Windows Hyper-v's virtual switch protocol and Linux OS. The linux OS is not able to understand the Hyper-V switch protocol. Today I tried to map the linux machine to the physical interface of Win host server, but it is not an option anywhere. I am sure this problem could get solved if I could map Linux's virtual ethernet adapter to physical interface of host machine. I can intermittently recollect that it was possible in win2K8 Hyper-V (not perfectly sure) !!!.
Today I could do some tweaks with adapters and virtual switch mapping(it was a 2 hour struggle so I can't remember exactly how I did), and at last I could access Linux machine from local LAN. But lost connectivity to RemoteDesktop service of host machine, which is anyways OK with me as I could connect to server through physical KVM.

5
  • I am about to leave the office now. So plz provide your advices & I'll be able to execute them after 14 Hrs. – user2593869 Apr 7 '15 at 12:25
  • Is the IP dedicated to the redhat VM? – awmusic12635 Apr 8 '15 at 2:48
  • Yes, the IP(static) I am using is dedicated for the VM only. To ensure that it is not a problem of duplicacy of host records, I've checked it in AD and nslookup also. I guess it is some incompatibility with Win-server Hyper-v and Redhat. Last machine I used had SSH working but no access to HTTP service. And now, this new machine replacing the older one is not accessible at all other than ICMP. – user2593869 Apr 8 '15 at 3:20
  • I just checked with TCPDUMP. It shows telnet packets (syn) reaching on interface and reset packet going back. But the issue is that SSH packets are not reaching there and even NMAP output doesn't show port 22 opened. Whereas 22 port is listening on netstat's output. – user2593869 Apr 8 '15 at 5:23
  • it could be problem with duplicate MAC address assigned to interface. Try to switch to dynamic or generate another MAC address. – user290666 May 25 '15 at 8:22
0

You said Firewall is down.

I'm assuming the firewall for the RedHat server is disabled.

Your seeing the microsoft ports open, because in order to get to your Redhat box your going via the Win2012 Hyper-V firewall to reach the IP for your RedHat Box.

Therefore you must also open the port TCP 22 on your Win2012 hyper-v Firewall.

If in doubt make sure you kill both firewalls, Hyper-V Host Server & RedHat Server FW.

Also download an SSH client on your Win2012 Hyper-V server (Putty) and ssh into the redhat box from the Hyper V server. See if that works.

If theres a hardware firewall between your SSH client and your Redhat box, in most cases especially in corporate environments SSH is blocked by default.

3
  • Thanks Kismet. I did as per your advice. Both the firewalls(redhat & Win2012 svr) are down. I telnetted the Ubuntu port from Win2K12 server (host machine) and it succeeded. But couldn't telnet it from other PCs in local LAN. – user2593869 Apr 9 '15 at 11:20
  • 1
    That means the FW on your Win 2012 server is blocking the SSH connection from other PCs on the lan. Also make sure the "other" lan PC firewalls are not blocking the outgoing SSH connection attempt. SSH is TCP 22. – Kismet Apr 9 '15 at 11:36
  • Kismet: I just played around with network adapters(of guest VM) assigned to virtual switch(of Win2K12). I enabled physical another network of host svr and randomly did some changes(i dont remember exactly what all i did), changed the switched assigned to host machine and I got the telnet to host Linux. Tomorrow again I'll make proper changes after reading some papers and when it works out, will post everything here for the reference for others. Really I have lost half of my hair & nails scratching my head. – user2593869 Apr 9 '15 at 12:47

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.