Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation should add a link in pfSense to UniFi controller #105

Open
cqr opened this issue Mar 27, 2018 · 11 comments
Open

Installation should add a link in pfSense to UniFi controller #105

cqr opened this issue Mar 27, 2018 · 11 comments

Comments

@cqr
Copy link

cqr commented Mar 27, 2018

I can look into doing this if a PR is welcome

@gozoinks
Copy link
Collaborator

Have at it. It was among the original goals of the project.

@ghost
Copy link

ghost commented Oct 28, 2018

I got mine working by adding a line to head.inc

$services_menu[] = array(gettext("UniFi Controller"), "/services_unifi.php");
Then creating a services_unifi.php file that contains:

<?php require("guiconfig.inc"); header("location: https://172.16.100.200:8443"); ?>

Only problem is, i had to manually insert my ip of the controller. Anyone know of a better way?
screen shot 2018-10-28 at 5 51 48 pm

@jmbwell
Copy link
Member

jmbwell commented Oct 29, 2018

Wouldn't $_SERVER['SERVER_ADDR'] work for that?

Do you have this in a branch on github we can look at?

@jmbwell
Copy link
Member

jmbwell commented Oct 29, 2018

I suppose the install.sh script could check whether services_unifi.php exists and if not, then add it in the way we do the .rc file, and then check for the line in head.inc and insert it if necessary…

@ghost
Copy link

ghost commented Oct 30, 2018

Thanks for your reply John. I'm not a PHP dev by day lol. I don't have anything on github at the moment.

@jmbwell
Copy link
Member

jmbwell commented Oct 30, 2018

Well thanks for the suggestion and example. It’s a simple solution. The next step is to automate.

@ghost
Copy link

ghost commented Oct 31, 2018

You're welcome. I like the idea behind this. If I can help in testing in any way let me know.

@St4tikk
Copy link
Contributor

St4tikk commented May 12, 2019

Thanks inetsec! Worked great.

@tong2x
Copy link
Collaborator

tong2x commented Jun 18, 2021

any updates on this feature?
we are currently supporting Pfsense and OPNsense though

@hacesoft
Copy link

Have a nice day,
is there any progress in this thought? It is almost unknown in Linux, but I am no stranger to PHP, HTML and writing C C code for x86 and PICs. So, if you help me stim. So in the evening I can add this to the original installation script. I would love to have a UniFi driver in the PfSense firewall. So far, I've installed the UniFi driver from the console. But I can't find out if the driver works, I don't know how and I don't know how to get to the UniFi web interface of the driver.
If you tell me exactly where to find certain files, I could give it in PHP.

Have a nice evening Pavel Prochazka.zde.cz

@hacesoft
Copy link

Wouldn't $_SERVER['SERVER_ADDR'] work for that?

Do you have this in a branch on github we can look at?



require("guiconfig.inc");

$ip_host = "https://" . ($_SERVER['SERVER_ADDR']) . ':8443';

header("location: $ip_host");


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants