Not able to ssh from outside network and after ssh my server internet connection is getting lost
Hello Team,
I've installed RHEL7.2 64 bit with Minimum Setting option at my server HP Proliant DL20 Gen 9 Intel and have public address and a virtual internal network.
I've done port forwarded to my server internal private IP Address to public address so that i can ssh from outside.
After fresh installation i've setup internet connection at very begnnning at the time of installation & after installation i was able to ping google.com on console and was able to ssh internally, but as soon as i try to ssh from outside network my internet connection is getting lost and even after rebooting and restarting network service i tried ping google.com its says unable to resolve host.
So after looking many link for solution at web and ended up in reinstalled my Operating system and tried ping google.com surprisingly it was working and tried again ssh internally and after that ping google.com it was working, but as soon as i tried ssh from outside network the internet connection got lost.
NOTE : Early i was using RHEL6 and there was no problem even after ssh from outside network it was working just fine and the reason the switch from RHEL6 to RHEL7 is docker have support for RHEL7 and above.
I've a strong feeling that something is getting updated in network script or somewhere else at my server machine.
I'm lost here, can you please help me, need assistance.
Appericate your help.
Thank You.
Regards,
Amit
Responses
Hello
is the service running and enabled to start at system start:
~]$ systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: disabled)
that is the response from my system, not what you want to see. If you see that, then you need to start it and also enable it to start at next system start.
See the Configuring OpenSSH chapter in the System Administrator's Guide.
BTW, you might find this discussion helpful Ways to check for open ports on RHEL
Have you checked the firewall configuration?. You may flush firewall rules and check if this could be done. Check if you could reach the system by doing a ping from out side, if this works then your routing from outside to your internal network is good. Please remember to take reload firewall rules if you've flushed off before (firewall-cmd --reload).
Hi Vishal
can you please share the output from
ip addr ip r s cat /etc/sysconfig/network-scripts/ifcfg-$interface-name-from-ip-addrThansk Sadiq
Looks like name resolution issue fro your node Can you send this output
dig www.google.com
And also output fro /etc/resolv.conf
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
