LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   sshd restrict connections (https://www.linuxquestions.org/questions/linux-security-4/sshd-restrict-connections-339009/)

introuble 07-01-2005 06:30 AM

sshd restrict connections
 
Hello ! On my PC I run only one Server , SSHD . It's already listening on a different port than the default one (port 58) , I've configured SSHD to allow log-ins only from <username@ip> . I have another problem though . I would like that .. connections should be accepted on port 58 only if the connecting ip matches <special_IP> . Meaning , if you try to connect on port 58 (connect, not log in), your connection attempt should be refused as if the port would be closed , if your ip doesn't match <special_IP> that is . I remember doing it through /etc/login.access but for some reason all my attempt to do it again now fail :S . Does anyone know how to achieve what I mentioned earlier ? (preferably through /etc/login.access ..)

Jeiku 07-01-2005 07:57 AM

It would be better to use some kind of firewall rule (iptables/ipchains/ipfw) for that kind of thing.

I would add a rule to drop any incoming connections on port 58 unless the connection came from a specific IP address.

Are you able to change the firewall rules of the box? If so I can post a rule for you...


All times are GMT -5. The time now is 02:38 PM.