mitchellurgero / openrsd

Open Raspberry Pi Server Dashboard
Apache License 2.0
39 stars 13 forks source link

Managing blocked IP-s, Whitelisting #22

Closed gnanet closed 2 years ago

gnanet commented 6 years ago

Based on the discussion in #9 where the ip of the LAN-s router got blocked, i have started to think about two things:

  1. Managing / unblocking blocked IP-s
  2. Some sort of whitelisting Manual list of IP-s to whitelist Suggest automatic whitelisting of subnet based on the RPi-s network interface IP-s, in case they are in the known private subnets

I'll make a PR if i have some solution that is presentable

mitchellurgero commented 6 years ago

Managing of blocked IP's already exists - Whitelist could be as simple as keeping an array list of IP's to ignore when checking the blocklist:

$whitelist = explode(PHP_EOL, file_get_contents(__DIR__."/whitelist.ip"));
if(in_array($whitelist, $_SERVER['REMOTE_ADDR'])){
    //Ignore, do something idk.

}

Then of course make a quick web interface for it. I am at work so if you want to experiment on this that's fine.

whitlist.ip file can be something like:

10.0.0.0/24
192.168.1.0/24
172.0.0.0/24
gnanet commented 6 years ago

The beauty of globality: you are at work i am near the evening. I think we have lots of time, but yes, i was not looking well enough, to find the management part. so the whitelist management idea stays, a manual, and a switchable automatic local subnets