Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a server with several IP addresses that hosts sites on each IP address. I have one ip address that does not have a site associated with it. I want to allow SSH login only to the one IP address that does not have a site associated with it. Is this possible? If so can anyone tell me how to accomplish this?

share|improve this question

migrated from security.stackexchange.com Oct 28 '12 at 6:50

This question came from our site for Information security professionals.

1 Answer 1

up vote 14 down vote accepted

Take a look at ListenAddress in your sshd_config.

ListenAddress
         Specifies the local addresses sshd(8) should listen on.  The
         following forms may be used:

               ListenAddress host|IPv4_addr|IPv6_addr
               ListenAddress host|IPv4_addr:port
               ListenAddress [host|IPv6_addr]:port

         If port is not specified, sshd will listen on the address and all
         prior Port options specified.  The default is to listen on all
         local addresses.  Multiple ListenAddress options are permitted.
         Additionally, any Port options must precede this option for non-
         port qualified addresses.
share|improve this answer
    
One could also have IPTables drop packets to that port that aren't directed at the correct IP address. –  ewanm89 Oct 28 '12 at 10:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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