How to block an IPv6 range

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
tfh
-


Joined: 03 May 2020
Posts: 122
Location: Netherlands

PostPosted: Thu Oct 17, 2024 8:10 pm    Post subject: How to block an IPv6 range Reply with quote

By using the IP Address Control, you can block certain IP address and by using the * you can block an entire range:

For IPv4 you can use for example aaa.bbb.*
For IPv6 I tried: aaaa:bbbb:cccc:dddd:*, but this is not accepted as a valid input.

Also a feature double feature request:

* Please make it possible to also have a server-wide list of IP's you can block
* Make it possible to define a custom error page for the blocked IP's instead of using the 403 status code.
_________________
https://www.arnauddeklerk.com
https://www.file-hunter.com
Back to top View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1324

PostPosted: Tue Oct 22, 2024 10:00 pm    Post subject: Re: How to block an IPv6 range Reply with quote

Valid IPv6 ranges syntax is described in https://aprelium.com/data/doc/2/abyssws-win-doc-html/ipv6.html .

For example aaaa:bbbb:cccc:dddd:* should be written like aaaa:bbbb:cccc:dddd::/64 .

tfh wrote:
Also a feature double feature request:

* Please make it possible to also have a server-wide list of IP's you can block
* Make it possible to define a custom error page for the blocked IP's instead of using the 403 status code.


The first suggestion is easy and can be added fairly quickly.

The second one is a bit complex despite looking straightforward. When a client is blocked, the server can only send error 403 back with some HTMl or plain text body. This could be done with the custom error pages right now. But most people design such page with links and references to the same site for images and CSS. So those are blocked too but will result in an ugly broken page.

Your 403 error page should be self-sufficient or reference media/CSS files hosted on another non-blocked domain (a CDN for example.) The 403 error page should also be declared as a virtual path for it to be served as the body of a proper 403 error. Otherwise, if it's an URL, error 403 won't happen per se and the client will be redirected with a status code 302 to the declared URL.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group