LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-27-2013, 02:28 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Rep: Reputation: 54
DNS server down, can't SSH to anything


My main server (which also does DNS) is "down" (network wise) thus DNS currently does not work on my network. I need to SSH into my switch to make some changes which are required to get the server back up. Problem is I cannot SSH into anything even by IP because from what I'm reading SSH does reverse lookups.

Is there a way around this? Worse case scenario I can maybe console into the switch.
 
Old 09-27-2013, 02:38 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,331

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Quote:
Originally Posted by Red Squirrel View Post
Problem is I cannot SSH into anything even by IP because from what I'm reading SSH does reverse lookups.
If that is true, then how come I can ssh between all my home computers on my LAN (192.168.0.xxx)? I have no DNS nor /etc/hosts set up for my home computers. I ssh via IP address only. Using OpenSSH.
 
Old 09-27-2013, 02:41 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
SSH DNS reverse lookups will timeout after 10 seconds or so, they won't prevent a log in.

Explain more about what is actually happening please.

Last edited by acid_kewpie; 09-27-2013 at 02:44 PM.
 
Old 09-27-2013, 02:54 PM   #4
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
I want my main Linux server (which does DNS and lot of other functions) to be vlan aware so I can put VMs on different vlans, so I configured the vlan interfaces. I disabled the eth0 "main" interface and lost connectivity. vlan2 is my main vlan but it's set as native on that port. I think all I have to do is go remove it from native and then put it as a normal vlan (have to allow each vlan for the trunk port). however I can't ssh into the switch by IP anymore, nor any other server. I type

ssh 10.1.1.3

It just sits there forever. Googled that, and found lot of stuff related to that being caused by DNS issues. My DNS server is also the server that does reverse lookups. Ex: 10.1.1.3 resolves to the hostname of the switch.

Oddly if I tcpdump I don't see ANY traffic when I type that. So maybe something else is going on. I can ping the host fine or telnet to the SSH port so I know it's not a network issue.
 
Old 09-27-2013, 02:56 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
no, it won't be DNS related. Add a few -v's to the ssh command, see if it's connecting on TCP at all. I presume it's not.
 
Old 09-27-2013, 03:30 PM   #6
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Tried that, I get nothing. This worked up until the server went down though.
 
Old 09-27-2013, 04:19 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
tried what? got what?
 
Old 09-27-2013, 04:49 PM   #8
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Adding -v. Nothing shows up on the screen. ex:

Quote:
# ssh -v 10.1.1.3 <cr>
<nothing>
ctrl+c
#
Oddly there is zero traffic passed when this happens, unless tcpdump filters some stuff like DNS, as it does lookups of it's own... or maybe it too was locking up. Lot of stuff seems to go tits up when reverse DNS lookups don't work. I could not even load wireshark, and at some point my GUI locked up. (KDE).

I'll probably just end up getting my laptop and a console cable to fix the switch that way once I get home from work (internet wont work till I fix it), but was hoping this was something easier to solve this ssh issue.

Guess this teaches me a lesson, should have a secondary DNS.
 
Old 09-27-2013, 07:11 PM   #9
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Sure enough when I fixed the issue on my switch to make the server available to the network again, everything started working. Weird it would do that. I have another issue regarding vlans but I'll make a separate thread.

Out of curiosity though is there anything I could have done at the client end to make it work, such as turn up a temporary DNS server?
 
Old 09-27-2013, 07:22 PM   #10
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
As previously stated, it's not a DNS issue, so, no, adding another DNS server would not help.

Your description of your network is unclear, but I suspect the connection issue is due to the subnet that your ssh client is trying to use being currently non-existant.
 
Old 09-27-2013, 11:41 PM   #11
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Nope was able to ping or telnet into the port so I knew routing was ok. I reproduced the issue by turning off DNS on the server just now, as I was curious. The SSH client must be trying to do something related to DNS such as a reverse lookup, and it causes it to hang. Maybe my environment is triggering a bug or something. Most people don't run their own DNS but just use the ISP one, and most of the people that may run their own DNS they probably don't run reverse zones too. So my environment is probably not what is considered typical. Though if you google "SSH hang DNS" or similar terms there are other people who have the same issue.

Video of me reproducing it:

http://www.youtube.com/watch?v=9xEvPZoIa3I

Don't mind the crap quality, youtube asked if it can enhance the colours, I should have said no. :P
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NX Server using SSH needs DNS L_RON Linux - Server 3 07-21-2008 07:23 AM
how to configure another dns server to combine use with primary current dns server. hocheetiong Linux - Newbie 1 05-29-2008 06:57 PM
LXer: Find out DNS Server Version With DNS Server Fingerprinting Tool LXer Syndicated Linux News 0 12-21-2007 05:30 PM
LXer: Find out DNS Server Version With DNS Server Fingeprinting Tool LXer Syndicated Linux News 0 12-21-2007 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration