- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Restricting IPs with ssh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 10:35 PM
12-02-2003 10:35 PM
Restricting IPs with ssh
In an attempt to tighten up our security, I have installed ssh and allowed telnet only from specific ips (inetd.sec)
Can I restrict IP addresses for ssh as I have done for telnet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 10:40 PM
12-02-2003 10:40 PM
Re: Restricting IPs with ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 10:45 PM
12-02-2003 10:45 PM
Re: Restricting IPs with ssh
you can restrict IP (and more) into /etc/hosts.allow and /etc/hosts.deny.
Past from a doc in knowledge base:
First configure /etc/hosts.deny as follows:
sshd : ALL
Next configure /etc/hosts.allow as follows:
sshd : rhino.rose.hp.com
sshd : 192.168.20.0/255.255.248.0
You can use IP ranges, hostnames or network numbers in these files.
I hope this helps you.
Best regards,
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 11:10 PM
12-02-2003 11:10 PM
Re: Restricting IPs with ssh
Mark, thanks for the response. I tried inetd.sec first, but this requires a service name e.g. telnet (one that exists in the /etc/services file) and ssh does not exist in this file. Therefore I cannot use inetd.sec to restrict IPs for ssh. Or am I wrong?
I tried the hosts.allow and it works. Many thanks. Can I use IP ranges & wildcards here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 11:55 PM
12-02-2003 11:55 PM
Re: Restricting IPs with ssh
you can use IP ranges, hostnames or network numbers in these files.
Best regards,
Ettore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 12:53 AM
12-03-2003 12:53 AM
Re: Restricting IPs with ssh
Terribly sorry to but...
I tried using a range as I do in inetd.sec e.g 123.456.789.111-115 but this does not work in hosts.allow. I did a man on hosts.allow and I got no info. My search on ITRC also proved futile in this reguard.
If I need to use a range what would the syntax be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 03:04 AM
12-03-2003 03:04 AM
Re: Restricting IPs with ssh
here is a document I found on the internet.
http://ezine.daemonnews.org/200206/hosts_allow.html
This syntax works in hosts.allow
sshd : all : banners=/usr/localcw/opt/sysguard/banners : allow
but you also need to have a line denying all access in hosts.deny...
I would also suggest adding these lines to hosts.allow as well....
ftpd : all : banners=/usr/localcw/opt/sysguard/banners : allow
telnetd : all : banners=/usr/localcw/opt/sysguard/banners : allow
tftpd : all : banners=/usr/localcw/opt/sysguard/banners : allow
logind : all : banners=/usr/localcw/opt/sysguard/banners : allow
rlogind : all : banners=/usr/localcw/opt/sysguard/banners : allow
remshd: all : banners=/usr/localcw/opt/sysguard/banners : allow
rexecd : all : banners=/usr/localcw/opt/sysguard/banners : allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 03:09 AM
12-03-2003 03:09 AM
Re: Restricting IPs with ssh
About half way down that link it shows syntax for the sshd as follows:
ssh : 10.0.3. : allow
ssh : localhost : allow
ssh : ALL : deny
Here are some options for the 2nd field..
Wild Cards: Wild card options that can be used are:
---ALL: All clients regardless of IP address or domain name.
---PARANOID: Clients that have hostnames that don't match its ident/domain lookup names. This does not apply to machines that do not have any reverse domain lookup names.
---LOCAL: A client that comes from the same machine or domain as the host.
---UNKNOWN: A client that cannot be resolved to anything known.
---KNOWN: A client who's name and addresses can be resolved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 09:30 PM
12-03-2003 09:30 PM
Re: Restricting IPs with ssh
I hope that Todd's links help you, there are described wildcard possibilities on /etc/hosts.allow and /etc/hosts.deny.
Best regards,
Ettore