I have a small project and am looking for a way to add a clients IP address to the IP-Firewall-Address List.
The best way for me would be that the clients goes to our client area on our website and clicks on a link and there current IP address is added to the address list.
Has anybody got any ideas of how we could do this?
Of course it still is extremely unsafe as those systems that scan all the internet on many different ports will hit your “magic port” and then add themselves to the addresslist, possibly your next step is to grant them more privileges e.g. logon to the router.
Scanning all ports will hit the one port that opens all.
I have done the following.
You need to knock three port in correct order withing certain time limit.
If you try one port that is not part of the knock or is not open for a service, you will be added to a black list for 24 hours, so you does not see any ports open.
…you can call it quick & dirty but you can also call it plainly insecure…
Is this something to be deployed in the public Internet ?
As a minimum, your website should parse the client-IP headers (eg. X-Forwarder-For, HTTP_Client_IP) and extract this IP address!
Then your webserver/appserver should apply some formatting and talk to the Mikrotik API (eg. through PHP) to add that client-IP to a certain ACL on the Mikrotik.
(eg. http://forum.mikrotik.com/t/help-cant-add-on-ip-firewall-address-list-with-php-api/36546/1)