hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Block one IP > mail
Reply

Forum Jump

Block one IP > mail

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old
WHT Addict
 
Join Date: Oct 2005
Posts: 117

Block one IP > mail


Anyone know how to block one specific IP
So that my box couldn't send Email to that IP
By PHP mail(); or SMTP ?

Is APF -d IP enough?

Thx in advice.



Sponsored Links
  #2  
Old
Junior Guru
 
Join Date: Jun 2008
Location: Los Angeles, CA
Posts: 237
use iptables to block all outgoing traffic to the specific IP

__________________
www.betteresolution.com
█ Dedicated Servers & More...

  #3  
Old
WHT Addict
 
Join Date: Oct 2005
Posts: 117
i did even ping to IP doesnt work
that will do trick?

Sponsored Links
  #4  
Old
Junior Guru Wannabe
 
Join Date: Aug 2009
Posts: 38
If you configured IPTables correctly for this, then yes, that is all you need.

  #5  
Old
Junior Guru
 
Join Date: Jun 2008
Location: Los Angeles, CA
Posts: 237
You should be all set.

__________________
www.betteresolution.com
█ Dedicated Servers & More...

  #6  
Old
WHT Addict
 
Join Date: Oct 2005
Posts: 117
Well to be honest I don't use iptables, i Use APF to block traffic.
But i get APF uses iptables.

I got in/out traffic blocked to IP that i wanted by adding

APF -d IPadress

rule

i wonder if it is enough?

  #7  
Old
Junior Guru Wannabe
 
Join Date: Aug 2009
Location: Bangalore
Posts: 59
run the commands below in your server command prompt.

/sbin/iptables -A OUTPUT -p tcp -i eth0 -s x.x.x.x --dport 25 -j DROP
/etc/init.d/iptables save

/etc/init.d/iptables restart

replace the x.x.x.x with the IP address that you want to block.


Thanks,
Mike

  #8  
Old
WHT Addict
 
Join Date: Oct 2005
Posts: 117
Thanks Mike but i did remove -i eth0 bcoz Iptables told me to.

  #9  
Old
Junior Guru Wannabe
 
Join Date: Aug 2009
Location: Bangalore
Posts: 59
Hey friend, It's fine

  #10  
Old
Web Hosting Master
 
Join Date: Nov 2004
Location: Australia
Posts: 1,527
apf uses iptables, it's just an easier interface to iptables. So if you've blocked the site with "apf -d" and you can't ping it, the site will be cut off.

If you really want to test it, try "telnet 1.2.3.4 25" where 1.2.3.4 is the IP you blocked; if it times out, then you know you've cut it off successfully. If you want to be even smarter, you could try turning iptables off.

  #11  
Old
Junior Guru Wannabe
 
Join Date: Jun 2009
Posts: 72
Quote:
Originally Posted by Cameleon View Post

I got in/out traffic blocked to IP that i wanted by adding

APF -d IPadress

rule

i wonder if it is enough?
yes that will work fine.

__________________
Windows VPS | Linux Hybrid Server | 99.9% Uptime
http://www.odishahosting.com ( USA DC)
http://www.odishahosting.in ( INDIA DC)

Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
web host block php mail... alternatives? ariopp Web Hosting 12 02-15-2009 06:21 PM
How to block a mail server marekc Hosting Security and Technology 2 12-13-2008 02:41 AM
block outgoing mail Saryooo Hosting Security and Technology 2 05-28-2007 04:37 AM
How can I block mail access on a domain? sytker Hosting Security and Technology 5 06-23-2006 02:05 PM
block incoming mail based on ip? r2tech Dedicated Server 4 05-28-2005 01:35 AM

Related posts from TheWhir.com
Title Type Date Posted
Rackspace Adds More SSD Storage Nodes to Deal with Availability Issues in Chicago and Dallas Web Hosting News 2014-05-23 12:24:27
Yahoo Mail Usernames, Passwords Stolen in Third-Party Database Breach Web Hosting News 2014-01-31 12:27:37
Web & PHP Conference 2013 Web Hosting Events 2013-09-17 14:48:22
Liquid Web Updates Block Storage, Adding Scale, Cross Mounting Web Hosting News 2012-12-14 16:17:44
Liquid Web Block Storage Offering Provides Flexible, Affordable Storage Option Web Hosting News 2012-11-20 15:03:47


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:
WHT Membership
WHT Membership



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?