IP Filter
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

IP Filter

Started by Aether, 09 November, 2008, 14:50:39

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aether

Hi, i am looking for a script that can do the following

1. block/allow IP's by preset CIDR masks in the script
2. tell the user what ISP he is using (found by configuration)
3. a custom blocked message to send to users that the script blocks
4. allow (a. local addresses, b. ops) to skip filter

user that connects would see something like

Quote*** Connecting to host.name.com...
*** Connected
*** Stored password sent...
<TestHub> This hub is running PtokaX DC Hub 0.4.1.1 (UpTime: 123 days, 123 hours, 123 minutes / Users: 0)
<TestHub> Your IP is: 123.123.123.123 (ISP: InsertISPnameHere)
<TestHub> Welcome

Blocked users would get something like

Quote*** Connecting to host.name.com...
*** Connected
*** Stored password sent...
<TestHub> This hub is running PtokaX DC Hub 0.4.1.1 (UpTime: 123 days, 123 hours, 123 minutes / Users: 0)
<TestHub> Your IP is: 124.123.123.123 (ISP: Unknown)
<TestHub> Sorry but your ip is not in the list of recognised IP's, this hub only allows IP's from Icelandic ISP's
<TestHub> If you belive you recived this message in error please post a message on http://forums.name.com showing this message

i am no lua programmer and i have NO idea of what the syntax is but i was thinking about setting the ip's somehow like this

allowedips
{
	isp1 = "the name that the user sees in one line (spaces allowed?)"
	{
		87.237.36.0/23
		87.237.38.0/23
		88.149.0.0/17
		88.151.48.0/21
	}
	isp2 = "some stupid isp"
	{
		93.95.224.0/21
		93.95.72.0/21
		130.208.0.0/16
		157.157.0.0/16
		157.157.139.0/24
		192.147.34.0/24
	}
}


if this is something impossible, tell me... :(
if not, i would be insanely thankful if someone could take the time to make it :D
if it already exists (has to take CIDR) then i could most likely use that :)

i can live without the showing isp part :P

Aether

Quote from: Mutor on 09 November, 2008, 15:01:00
RangeFilter 1.0g LUA 5.11 [Strict] [API 2] does much of what you request.
Alas it has no regard for CIDR. I'm not aware of any script that does.
do you have an url to that script ?

bastya_elvtars

RangeFucker is aware of CIDR just has not been updated. If you would be so kind as to drop me a message in my forum, I would look into updating it and adding ISP functionality.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk