Questions tagged [hosts.deny]

tcp_wrappers provides support for controlling access to tcp services normally specified by the hosts.allow and hosts.deny files. This may be done using tcpd, a wrapper service, or by linking the service providing daemon code to the libwrap library.

Filter by
Sorted by
Tagged with
0 votes
3 answers
2k views

How to allow a hostname reverse DNS in hosts.deny

I wish to BLOCK all sshd connection BUT one dynamic IP assigned to a <subdomain>.ddns.net so I've put this in /etc/hosts.deny: sshd: ALL EXCEPT <subdomain>.ddns.net This does not allow ...
0 votes
2 answers
2k views

How would you block a specific user from a specific IP and a specific port?

Just curious here, no real use case... The answer is probably /etc/hosts.deny but asking in case there are other way to do
1 vote
1 answer
1k views

using twist in hosts.allow [closed]

At the end of my hosts.allow I have the following: ALL : ALL \ : spawn (echo "%d" | /usr/bin/mail -s "tcpf\: %d attempt from %h." root) & \ : severity auth.info \ : twist /bin/echo "You are ...
3 votes
0 answers
461 views

hosts.allow, hosts.deny : One rule per service?

In quite a few places (some old, some recent) it's stated that the tcp-wrappers configuration files /etc/hosts.allow, /etc/hosts.deny allow only one rule per service. This looks wrong to me, I write ...
-4 votes
1 answer
74 views

EL5 /etc/hosts.deny not denying ".top"? [closed]

I get spam e-mails from places such as [email protected] among a LOT of others. I have an appropriate entry in /etc/hosts.deny but it doesn't seem to block anything from the .top domain. ...
0 votes
1 answer
302 views

ssh_exchange_identification - deny.hosts blocking ssh access due to my IP changing

Today my IP address changed. Due to this my ubuntu server has locked me out. When I try to access the server via SSH, I am presented with the follow error: ssh_exchange_identification: read: ...
6 votes
4 answers
10k views

How to delete ip address from denyhosts

I was experimenting with denyhosts from my home computer and now it has blocked my ip address and put in /etc/hosts.deny. Now my ip is not static and it chnages every week so i cna have fixed ip in ...
2 votes
1 answer
2k views

ssh DenyUsers - not working with my RHEL6 setup

I want to deny access to a single user (test1 ) from ip - 192.168.122.16. So this is what I have added the following line in /etc/ssh/sshd_config DenyUsers [email protected] Then have restarted ...
3 votes
4 answers
5k views

/etc/hosts.deny ignored in Ubuntu 14.04

I have Apache2 running on Ubuntu 14.04LTS. To begin securing network access to the machine, I want to start by blocking everything, then make specific allow statements for specific subnets to browse ...
2 votes
5 answers
333 views

Ubuntu Apache IP based access restriction

My server has been infiltrated by an outsider using my root user qualifications. With the root password changed, I'm trying to find extra strategies for securing the server. Using the /etc/hosts....
0 votes
1 answer
3k views

hosts.deny line too long or too big file?

I have about 50k ip addresses denied in the hosts.deny file, generated by a script with 7 addresses per line max and get this error: warning: /etc/hosts.deny, line 4429: missing newline or line too ...
0 votes
1 answer
651 views

Can /etc/hosts.deny/allow be overridden?

I have security measures put in place to keep unwanted users out of my server. I've changed the SSH port, disabled root login, have a software firewall to block portscans, and have entries in hosts....
1 vote
2 answers
628 views

What services does hosts.allow NOT affect?

I know that hosts.allow and host.deny only affect things that are tcpwrappered, but what does this mean in practice? It seems that most people use hosts.allow to handle ssh and nfs blocking, but what ...
0 votes
1 answer
233 views

How to disable yandex in tomcat?

Yandex.ru spiders are known of disobeying robots.txt. In Apache, you can disable yandex in htaccess file. How can I do the same thing with Tomcat? I'm using ubuntu server, so I thoght about ...
2 votes
2 answers
12k views

Linux: hosts.allow, hosts.deny - how do I allow all except hosts mentioned in hosts.deny

How do I configure hosts.allow and hosts.deny to allow all connections from all hosts except for some hosts/ports specified in hosts.deny? This is what I have now in these files: hosts.allow: ALL:...
5 votes
2 answers
1k views

What exactly is handling hosts.allow and hosts.deny?

On a Linux machine, there is hosts.allow and hosts.deny to either allow or deny certain hosts to access services running on the machine. The question is, what exactly is taking care of allowing or ...