How do I deny host?
I want to deny one person from being able to use services one my machine, specifically a web server, based on their ip address. I tried adding them to the hosts.allow file, but that didn't yield any results. Is there any other way I can deny someone from using services on the machine?
Thanks for any help. |
If you wanted to deny someone, you'd normally use hosts.deny. But not all services use tcpwrappers (hosts allow/deny) and specifically Apache does not. Probably the best way is to just use iptables:
As root do: iptables -I INPUT -p tcp --dport 80 -s xxx.xxx.xxx.xxx -j DROP You might have to adjust the destination port (--dport) if you're using a non-standard http port and substitute in the offending IP. ----EDIT--- If you want to keep them from accessing anything at all just do: iptables -I INPUT -s xxx.xxx.xxx.xxx -j DROP |
Can't help you, but I love your sig!
Siri Amrit |
Thanks for the iptables help. I was able to deny the person by using directory protection of the webserver's document root.
|
All times are GMT -5. The time now is 06:35 PM. |