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

    How captive portal works?

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 1 Posters 2.6k 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.
    • S
      sarut0bi
      last edited by

      i ve got several questions about captive portal
      when u tick "Enable captive portal" several rules are added to ipfw … which files do i need to edit to add my own rules ??
      when u r logging in captive portal following rules are added via index.php in captive portal folder

      
      exec("/sbin/ipfw add $ruleno set 2 skipto 50000 ip from $clientip to any in");
      exec("/sbin/ipfw add $ruleno set 2 skipto 50000 ip from any to $clientip out");
      /* add ipfw rules for layer 2 */
      exec("/sbin/ipfw add $l2ruleno set 3 deny all from $clientip to any not MAC any $clientmac layer2 in");
      exec("/sbin/ipfw add $l2ruleno set 3 deny all from any to $clientip not MAC $clientmac any layer2 out");
      
      

      and they are remove once Hard timeout has been reached … which files do i need to edit to remove my own rules related  first??

      greets

      1 Reply Last reply Reply Quote 0
      • S
        sarut0bi
        last edited by

        ok everything i need is in captiveportal.inc

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