Unable to SSH to an Ubuntu server, form the WAN

I have a virtualized Ubuntu environment. One of my servers allows SSH from the LAN but not the WAN. When I SSH to this server it responds with access denied.  I have other ports open on this server that I can access with no problems. What logs should I look at to determine why I can not SSH from the WAN
Barry-f4Asked:
Who is Participating?
 
arnoldCommented:
From the wan you have to make sure you have port forwarding setup as the default inbound requests are blocked by the firewall.
0
 
nociSoftware EngineerCommented:
Answer for log search:
grep sshd /var/log/*

and more detailed search/view on the logs that match...
sshd logs in various places: (auth failures, daemon failures, generic messages.).

You may want to look into the /etc/hosts.allow /etc/host.deny files.
0
 
Prabhin MPEngineer-TechOPSCommented:
Hi,
Please check /var/log/auth.log and /var/log/syslog

Check iptable -L -n -v
inorder to see whether firewall is blocking or not.


Please provide the output.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Barry-f4Author Commented:
Here it is
iptables.txt
0
 
arnoldCommented:
Look at
Iptables -L -t nat
iptables -L -t filter
Chains of interest  PREROUTING/postrouting DNAT SNAT

In your case you do not have any open ports on the INPUT side....
0
 
Prabhin MPEngineer-TechOPSCommented:
Hi,
can u provide me the output of ssh  with -vv paramater

ssh -vv username@IP
0
 
Barry-f4Author Commented:
It turns out that the firewall was "intercepting" port 22 for firewall SSH management. I changed SSH on rhe server in question to listen for SSH on a different port and we connected sucessfully
0
 
arnoldCommented:
IN the future, you do not need to alter ssh port on the server
Your external firewall ruke can be setup to forward any port you choose to port 22 of the internal server.

This way while on the LAN, you do not have to alter how to connect to this server.
0
 
Barry-f4Author Commented:
Yeah I know that but it was the quickest way around the issue once we realized that the Firewall had SSH management enabled
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.