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

    Is it possible for me to display a users IP address on the login page??

    Captive Portal
    7
    12
    36.2k
    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.
    • C
      craibo
      last edited by

      Is it possible for me to display a users IP address assigned to them by the pfsense DHCP server on the login page?? i want to do this so that when the view bandwidthd which is a link on the page they know which IP is theres and view there statistics.

      I know the login page is a basic html page but it says something in the captive portal file manager about using php but i don't know how to do it.

      Thanks

      1 Reply Last reply Reply Quote 0
      • J
        JorgeAldoBR
        last edited by

        put this where you want the ip to appear :

        1 Reply Last reply Reply Quote 0
        • J
          jeroen234
          last edited by

          upload this page as youre pfsense portal page

          HTML>
          
          

          now it will send you to p.php afther 1 sec

          p.php

          
          echo "
          
          ";
          echo "Welkom youre ipadress = ";
          echo getenv('REMOTE_ADDR');
          echo "
          
          ";
          ?>
          
          ">
          
             ">
          
          | 
          
          ### usernaam
          
           |  |
          | 
          
          ### wachtwoord 
          
           |  |
          |  |  |
          
          
          1 Reply Last reply Reply Quote 0
          • J
            JorgeAldoBR
            last edited by

            Why my code doesnt work ? (I did not try it, but i presume now that it doesnt work)

            1 Reply Last reply Reply Quote 0
            • J
              jeroen234
              last edited by

              ehmm i don't see code from you ??

              1 Reply Last reply Reply Quote 0
              • Cry HavokC
                Cry Havok
                last edited by

                @jeroen234:

                ehmm i don't see code from you ??

                Second post in this thread:

                @JorgeAldoBR:

                put this where you want the ip to appear :

                It wasn't inside a code block though, so not obvious :)

                1 Reply Last reply Reply Quote 0
                • J
                  jeroen234
                  last edited by

                  if you put that in a php page then it will work
                  in the example php portal page (3 post in topic) i have include it

                  1 Reply Last reply Reply Quote 0
                  • J
                    JorgeAldoBR
                    last edited by

                    Thank you.

                    1 Reply Last reply Reply Quote 0
                    • A
                      alexander007
                      last edited by

                      that dont work for me…it keeps reloading...

                      index.html

                      
                      Loading...
                      
                      

                      captiveportal-portal.php

                      
                      <form method="post" action="<?php echo $_GET[" portal_action"];="" ?="">">
                      
                      | **Usuario:** |  <label></label>  | **@uprrp.edu** |
                      | **Contraseña:** |  <label></label>  |   |
                      |   |  <label>" type="hidden"></label>  |   |
                      
                                  </form>
                      
                      

                      whats wrong?

                      1 Reply Last reply Reply Quote 0
                      • A
                        alexander007
                        last edited by

                        I found the problem ;D

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

                          @alexander007:

                          I found the problem ;D

                          What was it  ? :D

                          Do we have to supose that somethings is wrong with your posts ?

                          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
                          • D
                            docwho76
                            last edited by

                            Since no one seems to bother with documenting this, and I just finished banging my head against this issue where the redirect just keeps reloading itself and not going to the page specified. To fix it you MUST do the quotation marks in the META HTTP-EQUIV line correctly:

                            Bad

                            Good

                            Hope this saves other people torment anguish and wasted time Googling.

                            @Gertjan:

                            @alexander007:

                            I found the problem ;D

                            What was it  ? :D

                            Do we have to supose that somethings is wrong with your posts ?

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