Netgate SG-1000 microFirewall

Author Topic: Change ip by a name in the browser of my captive portal  (Read 111 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivett

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Change ip by a name in the browser of my captive portal
« on: August 13, 2017, 07:26:06 pm »
Good, I'm new to pfsense. I have configured a captive portal but I do not know how to give a name to my portal instead of leaving ip .... I was watching opnsense and that option gives me the same page of the captive portal but I want to do it in pfsense since it is more professional. Please some help on how to remove the ip to my captive portal and put a name using http protocol. Thanks in advance.

Offline Gertjan

  • Hero Member
  • *****
  • Posts: 1878
  • Karma: +155/-6
    • View Profile
Re: Change ip by a name in the browser of my captive portal
« Reply #1 on: August 14, 2017, 01:59:10 am »
Hi,

You are telling nothing about your setup, so I'll explain using mine as an example.

First of all, it's impossible to get rid of IP's. They will always exists  ;)

My captive portal lives on OPT1 - I'm using LAN for my own needs.
I'm using the DNS Resolver.
On the setup page of the DNS Resolver, I added a Host "Override". My OPT1 interface address is 192.168.2.1/24 (LAN is 192.168.1.1/24).
I added :
Host : portal
Domaine : my-domain.net
IP 192.168.2.1
Description : Whatever you want.

Know that declaring a host for a domain will not force your clients to use the this name ... The captive portal is hard coded to use the interface address IP when working with "http mode". https mode will (have to !) change that.

Now, the funny part : you have to switch to HTTPS login on the captive portal page.
As a domain name you chose your "portal.my-domain.net".
And ... you have to chose a certificate that your clients will accept (the Let encrypt acme package can help you here).