Forums  |   Blog  |   Contact  |   Chat Now  |   My Cart  |   MyServerBeach   
 

Go Back   ServerBeach Forums > Support > Cpanel
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 2003-12-11, 14:11 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
block IP with WHM?

Maybe I am blind, but is there place to enter IP's that you don't want to connect to your server globablly using WHM? I know you can do this per DOMAIN bases in Cpanel, but I wondered if there was a global pace within WHM?
__________________
I am MrPLC.com
Reply With Quote
  #2  
Old 2003-12-11, 14:33 PM
QT's Avatar
QT QT is offline
Just your average geek-girl.
Join Date: 2003 Jul
Location: San Antonio, Tx
Posts: 4,752
Send a message via ICQ to QT Send a message via AIM to QT Send a message via MSN to QT Send a message via Yahoo to QT
Looking over the WHM docs here:

http://www.cpanel.net/docs/whm/index.html

"Refer to How do I use WebHost Manager"

I'm not seeing anyplace that would allow that (of course, I could be blind too).

You could also use iptables (as root):

iptables -I INPUT -s "IP TO BLOCK" -j DROP
__________________
Charnell Lucich
Community Evangelist

ServerBeach | By Geeks, For Geeks

Twitter: @CharnellLucich
Reply With Quote
  #3  
Old 2003-12-28, 20:07 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Huh...

When I try and do a:

iptables -L

to LIST out BASH replies with a command not found. How can that be?

I am SU'd into my server.

I also got a bash command not found when I tried to add the IP address like you say QT. I read this page too:

http://www.netadmintools.com/part216.html
__________________
I am MrPLC.com
Reply With Quote
  #4  
Old 2003-12-28, 20:10 PM
QT's Avatar
QT QT is offline
Just your average geek-girl.
Join Date: 2003 Jul
Location: San Antonio, Tx
Posts: 4,752
Send a message via ICQ to QT Send a message via AIM to QT Send a message via MSN to QT Send a message via Yahoo to QT
Quote:
Originally posted by chakorules
Huh...

When I try and do a:

iptables -L

to LIST out BASH replies with a command not found. How can that be?

I am SU'd into my server.

I also got a bash command not found when I tried to add the IP address like you say QT. I read this page too:

http://www.netadmintools.com/part216.html
Did you try it as root or login as root properly?

Remember when you su to root, you use su -.
__________________
Charnell Lucich
Community Evangelist

ServerBeach | By Geeks, For Geeks

Twitter: @CharnellLucich
Reply With Quote
  #5  
Old 2003-12-28, 20:12 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
I forgot the DASH...shoot...thanks QT
__________________
I am MrPLC.com
Reply With Quote
  #6  
Old 2003-12-28, 20:14 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Can I do a wild card is that legal?

Like:

iptables -I INPUT -s "55.55.55.*" -j DROP

or do I have to do it like this:

iptables -I INPUT -s "55.55.55." -j DROP
__________________
I am MrPLC.com
Reply With Quote
  #7  
Old 2003-12-28, 20:19 PM
QT's Avatar
QT QT is offline
Just your average geek-girl.
Join Date: 2003 Jul
Location: San Antonio, Tx
Posts: 4,752
Send a message via ICQ to QT Send a message via AIM to QT Send a message via MSN to QT Send a message via Yahoo to QT
If you want to block the entire Class C then you'd do it like this:

iptables -I INPUT -s 55.55.55.0/24 -j DROP

You cannot use a * or ? wildcard with iptables. Only IP address and netmask (/24 is the netmask for a Class C)
__________________
Charnell Lucich
Community Evangelist

ServerBeach | By Geeks, For Geeks

Twitter: @CharnellLucich
Reply With Quote
  #8  
Old 2003-12-28, 20:23 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Great thanks QT.

I also found a document that I can do a range like this:

iptables -I INPUT -s 55.55.55.1:55.55.55.100 -j DROP

does that look correct to you?
__________________
I am MrPLC.com
Reply With Quote
  #9  
Old 2003-12-28, 20:26 PM
QT's Avatar
QT QT is offline
Just your average geek-girl.
Join Date: 2003 Jul
Location: San Antonio, Tx
Posts: 4,752
Send a message via ICQ to QT Send a message via AIM to QT Send a message via MSN to QT Send a message via Yahoo to QT
Quote:
Originally posted by chakorules
Great thanks QT.

I also found a document that I can do a range like this:

iptables -I INPUT -s 55.55.55.1:55.55.55.100 -j DROP

does that look correct to you?
That's correct, yes.

You can do a range, but it doesn't really make sense since IPs are assigned by network and not ranges.
__________________
Charnell Lucich
Community Evangelist

ServerBeach | By Geeks, For Geeks

Twitter: @CharnellLucich
Reply With Quote
  #10  
Old 2003-12-28, 20:37 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Yeah that seems dumb your right.

I like doing the whole Class C block.

I got a spammer that must be on dialup. So I am blocking all 254 possibilities of his dialup ISP... ;-) I think most dialup ISP are allowed a Class C.

Might be harsh, but what else can you do...hate being mr meany pants....
__________________
I am MrPLC.com
Reply With Quote
  #11  
Old 2003-12-28, 20:40 PM
knightfoo's Avatar
knightfoo knightfoo is offline
Code Ninja
Join Date: 2003 Jul
Location: San Antonio, TX
Posts: 2,568
Most dialup providers lease their POPs from companies like ATT,C&W, Qwest, UUNet, etc. so they can be sitting on a Class A (/8) netblock. Depending on their area and how many customers they have in a specific area, they may have dozens of Class C blocks assigned to a specific dialup bank. My SBC DSL account hops between 3-4 different Class A networks whenever I disconnect and reconnect.

-knightfoo
__________________
I am not a ServerBeach employee, but I used to play one at work.
Real admins run Debian!
Recursive; adj. See Recursive
Reply With Quote
  #12  
Old 2003-12-28, 20:43 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Great...thanks alot Knightfoo for BURSTING my bubble.....

it's good to know this information.

This spammer has tried four times and SO FAR, he is in one Class C..I hope it stays that way...
__________________
I am MrPLC.com
Reply With Quote
  #13  
Old 2004-01-07, 22:59 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Uh....just a quick adder here...

CPanel clears the IPTABLES by default (INPUT) ones... everyday.

If you want iptables to remember your INPUT chains, you have to do a:

iptables -save

then tomorrow, those IP addresses you entered will still be there.
__________________
I am MrPLC.com
Reply With Quote
  #14  
Old 2004-01-13, 20:43 PM
WestBendWeb WestBendWeb is offline
Registered User
Join Date: 2003 Oct
Posts: 199
thanks for this thread.. just had to block about 200 proxies that were being used to harass an MT blogging site on my box.

However i dont see in the help for iptables anything to do with the command -save
I tried it on my box (RH) and it didnt like that command either...

thanks to you both
__________________
www.WestBendWeb.com
www.Blogs-About.com
Reply With Quote
  #15  
Old 2004-01-16, 16:36 PM
chakorules's Avatar
chakorules chakorules is offline
Registered User
Join Date: 2003 Jul
Location: Indiana, USA
Posts: 235
Send a message via ICQ to chakorules Send a message via AIM to chakorules Send a message via Yahoo to chakorules
Actually.

it's

# iptables-save

no space.

sorry about that.
__________________
I am MrPLC.com
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:10 PM.