How can I refresh the CP Allowed Hostnames IPs table



  • When I add a site like smtp.gmail.com the CP tables get multiple IPs for the site.  That is good.

    This IPs do not change much for a given region so they are accurate for long times, but there is the possibility that they change some of them without notice.

    I will like to refresh the IPs values every some period using cron or at least manually.

    How can I refresh the CP Allowed Hostnames IPs table?



  • Hi,

    Why ?
    Your captive portal is on a boat or plane ?  :)

    I advise you to check it out with a host name that changes often (some kind of DDNS host).

    You'll be in for a surprise.

    (you can see it in action here : enter SSH, and type

    ps aux | grep 'filter'
    

    You will find :

    root       16520   0.0  0.1  23096  2708  -  Is    2Aug16      0:18.58 /usr/local/sbin/filterdns -p /var/run/filterdns-[ZONE]-cpah.pid -i 300 -c /var/etc/filterdns-cpzone1-captiveportal.conf -y 2 -d 1
    
    

    which means :
    Every 5 minutes, resolve all host names from the file "/var/etc/filterdns-[ZONE]-captiveportal.conf" and writes (changes) the IP's into the captive portal's "ipfw" (the captive portal firewall).

    Also, check out this file

    cat /var/etc/filterdns-[ZONE]-captiveportal.conf 
    

    (change [ZONE] for your zone name)
    this is the list with the host names you entered into the list used by your captive portal.

    So, the final answer to the question "How can I refresh the CP Allowed Hostnames IPs table" is : you don't, it already been take care off.