Go Back   cPanel Forums > General Discussion > cPanel Newbies

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-12-2008, 03:54 PM
Registered User
 
Join Date: Dec 2007
Posts: 119
meeti is on a distinguished road
Host Access Control (block IP access)

Hi,


i want to block all the ips of 124.115.*.*,


in whm "Host Access Control (block IP access) ",


how can i set it?



and how can i make sure if what firewall is installed on the server already?



thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-12-2008, 07:01 PM
viraj's Avatar
Registered User
 
Join Date: Sep 2006
Location: India
Posts: 204
viraj is on a distinguished road
Cool

Hi Meeti,

Refer this link for more details on CSF [the best firewall] : ConfigServer Security & Firewall Released

CSF works like a charm on all of our VPS & Dedicated servers, you get too many configuration options for setting up the firewall properly.

To block a particular IP/subnet use this command from the SSH console :
Quote:
iptables -I INPUT -s 124.115.0.0/16 -j DROP
__________________
Regards,
Viraj

http://www.host.co.in

DEDICATED HOSTING|WINDOWS VPS|LINUX VPS |WINDOWS HOSTING
CPANEL HOSTING|RESELLER HOSTING|SEMI-DEDICATED HOSTING

Phone:0253-2342932|Mobile:+91-9860900069
Support/Billing/Sales:24x7x365 sales@host.co.in | support@host.co.in
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-12-2008, 09:20 PM
Registered User
 
Join Date: Dec 2007
Posts: 119
meeti is on a distinguished road
HI,

can i ask how can i check all the bloacked ips on the server?



thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-13-2008, 12:13 AM
viraj's Avatar
Registered User
 
Join Date: Sep 2006
Location: India
Posts: 204
viraj is on a distinguished road
Sure, run this from SSH console to check the complete firewall list :

Quote:
iptables -L
__________________
Regards,
Viraj

http://www.host.co.in

DEDICATED HOSTING|WINDOWS VPS|LINUX VPS |WINDOWS HOSTING
CPANEL HOSTING|RESELLER HOSTING|SEMI-DEDICATED HOSTING

Phone:0253-2342932|Mobile:+91-9860900069
Support/Billing/Sales:24x7x365 sales@host.co.in | support@host.co.in
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-13-2008, 12:23 AM
Registered User
 
Join Date: Dec 2007
Posts: 119
meeti is on a distinguished road
dear viraj,


thanks with the help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-13-2008, 01:39 AM
apscinsspl's Avatar
Registered User
 
Join Date: Mar 2008
Posts: 112
apscinsspl is on a distinguished road
Hello,

iptables -I INPUT -s 124.115.0.0/16 -j DROP

will block the incoming connections, to block the outgoing connections for that Ip range will be:

/sbin/iptables -A OUTPUT -d 124.115.0.0/16 -j DROP

I would also suggest you to run the command:

/sbin/iptables-save

which will save the IPtables rules in the file:

/etc/sysconfig/iptables.save

so that when the server gets rebooted next time, the kernel will load the saved Iptables configuration. Other wise after your next server reboot, this Iprange will be open on the server again.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 03:56 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc