Captive Portal webpage editing

Home Page Forums Network Management ZeroShell Captive Portal webpage editing

This topic contains 4 replies, has 0 voices, and was last updated by  firstmile 12 years, 3 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #40643


    Hi folks,

    is it possible to edit the source code for the ‘Captive Portal’ login page?

    I’d like to base the design of the login page on our existing website, if possible.




    In the current release is not possible by using the web GUI. I will implement this feature in the future. In any case, you can manually modify the file /root/kerbynet.cgi/template/cp_showauth that contains the HTML and Javascript code of the web login page. Keep in mind that the directory /root/ is stored in a RAM disk. To do your changes permanent, you just have to save the file in the /Database directory and add in the /etc/rc.local a cp which copies the file in the original position after any reboot.




    Thank you Fulvio. I’ll take a look at this.




    I’m trying to do some modifications to the captive portal page too. However, I can’t figure out where some of the items are located.

    For instance on the captive page, the text reading “Captive Portal Web Login” and the text “Network Access Example.”

    I’ve executed a:

    cat cp* | grep "Network Access"

    in /root/kerbynet.cgi/template and find nothing.

    If you view source on the client machine, you’ll see the text is in there, which leads me to believe its dynamically generated somewhere, I just haven’t been able to find it.

    Also I’m trying to change the picture and the text below it on the same screen. I’ve copied a new image file over, but it doesn’t work. I’ve edited the cp_showauth to account for the new file extension (went from .jpg to .gif) but no go.

    Can anyone point me in the right direction?



    I am digging around for the location in the iso for this captive portal layouts. so i can also edit this. im on the .5 release. ill take some more pointing and directions please 🙂

    thanks again for a great and simple solution package.



    The custom html login screen cannot be edited accept for the headers that it allows you.

    All the funtionality for the redirect stuff is in a compiled programm called:

    this dynamically creates the web page on the fly, and handles the redirect to the original web page.

    We are stuffed, unless we can rewrite, and recompile this program.

    It generates code like this, which cannot be edited in any file:

    //commented out to stop any redirect in the forum//
    function RedirectSite() {
    var WO=window.opener
    if (WO!=null) {
    function loaded() {
    window.onbeforeunload = DontCloseW;


    This hard coding of the redirect happens on the fy by this program.

    Anybody got a C-compiler??

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.