I am about to install 10.04 (from bare metal to replace 9.04) and I want to set it up so that I can shh into the machine, but only from other machines on my local network. (I.e., I want to reject all ssh attempts from other than 192.168.1 set of IPs.) How do I do that correctly on 10.04?
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
You have to edit the two configuration files etc/hosts.allow:
etc/hosts.deny:
In both cases you could replace |
|||
|
|
|
In addition to using hosts.allow and hosts.deny, you can use firewalls. "ufw" is installed by default in Ubuntu. You enable it with
and then limit the ssh connectivity with `
That should do it. I believe the FireStarter application will allow a GUI configuration of ufw as well. |
|||||
|
hosts.allow/denyanswers are correct, but it also makes sense for your home gateway/router to silently ignore all inbound packets from port 22 (and most other ports too). – msw Aug 14 '10 at 14:54