IP banning - only a specific IP

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Get Involved
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Aycliffe
Registered User
Posts: 1
Joined: Wed Sep 17, 2014 3:52 pm

IP banning - only a specific IP

Post by Aycliffe »

Hi all, and please forgive me if in the incorrect place.

I wish to ban an IP address, but not a full one. How can I do this?
The one I wish to ban starts in 88.150 and this is all I want to block. Is there a way to do this?

Kindest,

Tom

cleverwise
Registered User
Posts: 37
Joined: Fri Feb 28, 2014 10:55 pm
Location: Atlanta, GA
Name: Jeremy

Re: IP banning - only a specific IP

Post by cleverwise »

If you are comfortable editing your htaccess file:

Code: Select all

order allow,deny
deny from 88.150.
allow from all
Note: If you already have deny from entries, then just add the deny from 88.150. line.

Many control panels like cPanel, Plesk, etc have ways to block IPs too. If you use .htaccess you'll block the IPs from your whole website and not just phpBB, which is what happens if you use phpBB banning.
Respectfully,
Jeremy

DevOPs - Linux Admin, PHP Developer, Oracle DBA OCP Training
Display phpBB statistics on WordPress (Read more...)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51096
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: IP banning - only a specific IP

Post by stevemaury »

You can use wildcards in the IP ban settings in phpBB. It's a waste of time, though
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

cleverwise
Registered User
Posts: 37
Joined: Fri Feb 28, 2014 10:55 pm
Location: Atlanta, GA
Name: Jeremy

Re: IP banning - only a specific IP

Post by cleverwise »

Well if someone is getting slammed by a specific A block or B block IP range that would be easy to stop. However listing individual IPs can get very annoying.

As for doing it at phpBB or web server levels both have advantages and disadvantages.

phpBB level is easier as it is in the admin panel of the software and requires no editing of files. However this still puts load on your database since phpBB must fire on each load. Plus it only protects phpBB, although not an issue if that is all a site runs.

The .htaccess (or web server) level can be a bit more complex but is faster and doesn't require phpBB. It saves on database load as the database isn't used. Plus it will work for any software on the site.

If these are the two options available, which is most people, then those are the main options. However if you have access to a firewall (software or hardware based) I suggest that route. Firewalls are the better approach at stopping access to sites and devices.
Respectfully,
Jeremy

DevOPs - Linux Admin, PHP Developer, Oracle DBA OCP Training
Display phpBB statistics on WordPress (Read more...)

mack the knife
Registered User
Posts: 141
Joined: Wed Aug 30, 2006 9:08 am

Re: IP banning - only a specific IP

Post by mack the knife »

Hiya,

Re: .htaccess

I've been getting hammered with requests visiting my website and used the Stop Forum Spam website to block them from slowing my web forum down. I made a note of the IP addresses and put them in the .htaccess file. This seems to work using .htaccess

I'm on shared hosting.

The spammers never got to my site but the IP's were creating a considerable load on the server.

Order Deny,Allow
Deny from ***.58.100.0/24
Deny from ***.244.93.115
Deny from ***.201.224.32
Deny from ***.201.224.34
Deny from ***.204.239.115
Deny from ***.91.24.203
Deny from ***.151.144.242

I didn't add "allow from all" in it though below the list. Should I add it?

Website running much faster after doing this.

Did I do right?

Mack

mack the knife
Registered User
Posts: 141
Joined: Wed Aug 30, 2006 9:08 am

Re: IP banning - only a specific IP

Post by mack the knife »

Just to add I partially blanked off posting the IP's blocked in my previous post with ***

Cheers,

Mack

cleverwise
Registered User
Posts: 37
Joined: Fri Feb 28, 2014 10:55 pm
Location: Atlanta, GA
Name: Jeremy

Re: IP banning - only a specific IP

Post by cleverwise »

That should work. If you want to test add your IP to the list and see if you are blocked. Then remove your IP. :)
Respectfully,
Jeremy

DevOPs - Linux Admin, PHP Developer, Oracle DBA OCP Training
Display phpBB statistics on WordPress (Read more...)

mack the knife
Registered User
Posts: 141
Joined: Wed Aug 30, 2006 9:08 am

Re: IP banning - only a specific IP

Post by mack the knife »

Cheers cleverwise :)

Mack

MontanaBighorn
Registered User
Posts: 49
Joined: Thu May 10, 2007 2:30 am
Location: Montana
Contact:

Re: IP banning - only a specific IP

Post by MontanaBighorn »

I utilize command line in my Linux based firewall. I run the IP through http://whois.arin.net which then gives you the CIDR for the IP address. I take that information and enter it in the command tab of my router:

iptables -I INPUT -s xx.xx.xx.0/24 -j DROP

Let your router do the work; its much faster than utilizing server resources.
Nathan In Montana

Mikado14
Registered User
Posts: 3
Joined: Sat Apr 18, 2015 12:35 pm
Location: Pennsylvania
Contact:

Re: IP banning - only a specific IP

Post by Mikado14 »

I realize that this is a partially dead if not dead thread but I am having an issue'

I am operating PHPBB version 3.0.11

I am having an issue of someone coming on the forum from a specific IP provided by At&t Wi-fi Services (wayport public access). I have repeatedly blocked the IP but it is still coming into the forum which is validated by StatCounter. I have tried erasing the IP and reentering it. I have used a wildcard and still it enters.

How is it still getting into the forum even though blocked? I don't want to go into the cpanel if not necessary and write into .htaaccess if I don't have to.

Any help or explanation would be and is greatly appreciated.

Mikado

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51096
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: IP banning - only a specific IP

Post by stevemaury »

"Enter" in what way? Register, post, what?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Mikado14
Registered User
Posts: 3
Joined: Sat Apr 18, 2015 12:35 pm
Location: Pennsylvania
Contact:

Re: IP banning - only a specific IP

Post by Mikado14 »

When I say "reentering", I am referring to the ability to come to the site and navigate around to the various threads.

When I block IP's, they get a message informing them that they are blocked from viewing. That message shows up on the StatCounter as an information page.

When I block this particular IP, they still can enter the site and navigate even though their IP is banned.

Hope I made myself clear. This is the only IP that even though banned, can still enter the site. The IP is recorded on the StatCounter.

Thanks,

Mikado

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: IP banning - only a specific IP

Post by Oyabun1 »

If you are banning the IP through phpBB that only stops whatever is using that IP from registering or logging in. It does not prevent it viewing the site as a guest.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

Mikado14
Registered User
Posts: 3
Joined: Sat Apr 18, 2015 12:35 pm
Location: Pennsylvania
Contact:

Re: IP banning - only a specific IP

Post by Mikado14 »

I disagree with you. I know from experience when I inadvertently blocked the IP of someone I knew and when they went to the site, they immediately got a dialog box when they attempted to view any of the threads as a guest. They called me and I unblocked their IP.

StatCounter also shows a blocked IP when they enter on the Index page but if they go to a forum thread, a dialog box comes up informing them of being banned and that dialog box shows up in the StatCounter.

Mikado

Locked

Return to “[3.0.x] Support Forum”