LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   help me block an ip (https://www.linuxquestions.org/questions/linux-security-4/help-me-block-an-ip-250677/)

Zac2003 11-03-2004 12:14 PM

help me block an ip
 
ok somone is using a php or cgi script on my server and sending email though my server as anonymous with my local ip of 127.0.0.1 how can I with plesk disable users from sending email that way, can I make it not allowed in the hosts.allow or what are some options?

thanks, Zac

Capt_Caveman 11-03-2004 09:48 PM

Tcpwrappers (hosts.allow/deny) aren't used by all applications, so it's usually a good idea to consult the tcpwrapper and specific apps documentation to verify if they do. One of those which doesn't by default is Apache.

Probably the best way to block traffic with a given host is with iptables. The general structure of a rule for blocking a host with IP X.X.X.X would be:
iptables -I INPUT -s X.X.X.X -j DROP

If you'd like to block local users from being able to send mail to a given host use:
iptables -I OUPUT -d X.X.X.X -j DROP

Another good measure to take is to password protect the web interface pages in order to prevent this kind of abuse. Something like htaccess is rather easy to setup and is enough to dissuade most lazy spammers.


All times are GMT -5. The time now is 08:14 AM.