LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-06-2006, 12:54 PM   #1
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Rep: Reputation: 38
Setting up SSH to bind to one and only one IP address


I have a server with two IP addresses... one address is for external (to the WWW) and the other is internal. I changed /etc/ssh/sshd_config to show:

ListenAddress 10.31.164.18

After this, I restarted it. It is still listening on both IP addresses.

Anyone know how to fix this?

Thanks,

Harlin
 
Old 06-06-2006, 07:54 PM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
are both of those IPs on the same NIC?? or do you have two NICs??

cuz my best guess is that sshd just binds to the interface on which the given IP is... if that's the case, and you only have one NIC, then that might explain why you are getting this behavior... you could always forget about the "ListenAddress" thing and instead filter the packets using iptables...

just my ...

Last edited by win32sux; 06-06-2006 at 08:00 PM.
 
Old 06-07-2006, 02:16 AM   #3
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
It works for me if I put 127.0.0.1

Maybe activate some logging in sshd_config and look at log files?

again
 
Old 06-07-2006, 05:47 AM   #4
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
My goof... we are using a very smart routing configuration at work -- the 10.xxx segment is part of a VPN -- if you're inside then it will automatically send you to that 10. address when using the DNS name. When I try to access it via the external address it times out :-)
 
Old 06-07-2006, 05:53 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by Harlin
My goof... we are using a very smart routing configuration at work -- the 10.xxx segment is part of a VPN -- if you're inside then it will automatically send you to that 10. address when using the DNS name. When I try to access it via the external address it times out :-)
cool, i wouldn't have ever imagined it was NAT-related... i assumed you had done a netstat and had actually seen sshd listening... anyways, it's good to hear everything's okay...
 
Old 06-07-2006, 07:16 AM   #6
Harlin
Member
 
Registered: Dec 2004
Location: Atlanta, GA U.S.
Distribution: I play with them all :-)
Posts: 316

Original Poster
Rep: Reputation: 38
oh no.. im not that advanced ;-)
 
  


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
Could not bind to address 0.0.0.0:80 Linuxn00b Linux - Newbie 18 01-17-2012 11:59 PM
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:443 bruvajon Linux - Software 34 11-30-2011 03:08 PM
Bind multiple IP address FriendlyLinuxGuy Red Hat 3 02-07-2006 11:10 PM
Could not bind to address 0.0.0.0:80 Linuxn00b Linux - Networking 3 01-23-2006 08:55 AM
bind : Address already in use sheni Linux - Networking 1 11-11-2004 12:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:49 PM.

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