Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How can I refresh the CP Allowed Hostnames IPs table

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 2 Posters 815 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jetberrocal
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by

        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.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.