Whitelist IP by visiting specially crafted pre-defined URL

Post Reply
ieh
Junior Member
Posts: 3
Joined: 30 Dec 2014, 13:57
Contact:

Whitelist IP by visiting specially crafted pre-defined URL

Post by ieh »

From time to time, I'll get myself locked out because I've made a typo in a password or something like that; latest case was making a typo on the cPanel port. Then I'm blocked until I figure out what I did, and have to wait.

Meanwhile, to prevent this, since it's my effing server, I whitelist my ISP-provided public IP address. Which occasionally changes. Which means every few months, I go into a panic thinking my server crashed only to figure out that my public IP changed again and I'm no longer whitelisted.

In the best case scenario, I have to wait a bit and connect to whitelist myself, although I never remember how long I have to wait for it, so I end up waiting a while, and meanwhile, I can't get any work done.

So my solution to the problem would be to have a setting somewhere so I could visit a URL I'd previously set up that would automatically whitelist my IP. Perhaps defining a custom port with a custom URL string like /whitelist/some-long-password-like-string-here on port, say, 14983. Something unused. Although the port idea isn't really necessary. Just almost thinking it might work as a limited two-factor style thing for idiots that wouldn't generate a strong enough password. (In my case, I'd use a 32-character randomly generated string that I saved along with my other important passwords).

Or if there's some other method of rescuing oneself once one is locked out, I'd love to know. :D But did a bit of searching and nothing turned up…
marcele
Junior Member
Posts: 215
Joined: 17 Sep 2007, 17:02

Re: Whitelist IP by visiting specially crafted pre-defined U

Post by marcele »

Easiest way to handle this:

1. Sign up to a free dynamic DNS service eg.: http://www.noip.com/free (many routers support some built right into the router).
2. Add your new hostname you chose to /etc/csf/csf.dyndns

From the csf.dyndns file:
The following FQDN's will be allowed through the firewall. This is controlled by lfd which checks the DNS resolution of the FQDN and adds the ip address into the ALLOWDYNIN and ALLOWDYNOUT iptables chains. lfd will check for IP updates every DYNDNS seconds if set.
ieh
Junior Member
Posts: 3
Joined: 30 Dec 2014, 13:57
Contact:

Re: Whitelist IP by visiting specially crafted pre-defined U

Post by ieh »

Wow. That's crazy. lol. Thanks, I'll give it a go. :)
Post Reply