Community discussions

MUM Europe 2020
just joined
Topic Author
Posts: 4
Joined: Fri Jun 17, 2011 4:39 pm

strange issue with hotspot login page

Mon Mar 26, 2012 5:43 pm

Hi All really sorry but I will really need your help to solve a very strange issue I'm
facing with hotspot stuff on RB1100 with ROS5.4

first af all this is my config

Ether1 WAN = Connected with ISP router
default Router =
#we bridge all others ports from ether2-ether10  / Connected with LAN/Hotspot users
/interface bridge add name="LAN"
/interface bridge port
add bridge=LAN interface=ether2 horizon=1
add bridge=LAN interface=ether3 horizon=1
add bridge=LAN interface=ether4 horizon=1
add bridge=LAN interface=ether5 horizon=1
add bridge=LAN interface=ether6 horizon=1
add bridge=LAN interface=ether7 horizon=1
add bridge=LAN interface=ether8 horizon=1
add bridge=LAN interface=ether9 horizon=1
add bridge=LAN interface=ether10 horizon=1
LAN = Connected with LAN/Hotspot users
/ip address add address= comment=WAN disabled=no interface=ether1 network=
/ip address add address= comment=LAN disabled=no interface=LAN network=
/ip pool add name=hs-pool-1 ranges=
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=250000KiB max-udp-packet-size=512 servers=
/ip dhcp-server add address-pool=hs-pool-1 authoritative=after-2sec-delay bootp-support=static disabled=no interface=LAN lease-time=1d name=dhcp1
/ip dhcp-server config set store-leases-disk=5m
/ip dhcp-server network add address= comment="hotspot network" gateway=

/ip hotspot profile 

set default dns-name="" hotspot-address= html-directory=hotspot http-cookie-lifetime=1d http-proxy= login-by=cookie,http-chap name=default rate-limit="" smtp-server= split-user-domain=no use-radius=no

add dns-name="" hotspot-address= html-directory=hotspot http-cookie-lifetime=1d http-proxy= login-by=cookie,http-chap,mac name=hsprof1 rate-limit="" smtp-server= split-user-domain=no use-radius=yes

/ip hotspot add address-pool=hs-pool-1 addresses-per-mac=2 disabled=no idle-timeout=5m interface=LAN keepalive-timeout=none name=hotspot1 profile=hsprof1
/ip hotspot user profile set default idle-timeout=none keepalive-timeout=2m name=default shared-users=1 status-autorefresh=1m transparent-proxy=no

/ip hotspot service-port set ftp disabled=yes ports=21
/ip hotspot walled-garden ip add action=accept disabled=no dst-address=
/ip hotspot walled-garden ip add action=accept disabled=no dst-address=
/ip hotspot walled-garden add dst-port=443 action=allow

/radius add service=hotspot address= secret=myveryweaksecret
/ip firewall nat add action=masquerade chain=srcnat disabled=no
/ip route add disabled=no distance=1 dst-address= gateway= scope=30 target-scope=10
till now everything works great so I set a redirect with customization of
$(if chap-id)
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="" method="post">
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="username" value="$(username)">
<input type="hidden" name="link-login" value="$(link-login)">
<input type="hidden" name="link-orig" value="$(link-orig)">
<input type="hidden" name="error" value="$(error)">
<input type="hidden" name="chap-id" value="$(chap-id)">
<input type="hidden" name="chap-challenge" value="$(chap-challenge)">
<input type="hidden" name="link-login-only" value="$(link-login-only)">
<input type="hidden" name="link-orig-esc" value="$(link-orig-esc)">
<input type="hidden" name="mac-esc" value="$(mac-esc)">
<input type="submit" value="continue">
<script language="JavaScript">
and My webserver(
<!doctype html>
<html xmlns="">
<title>Guineanet hotspot</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/shadedborder.js"></script>
<script language="javascript" type="text/javascript">
  var holderBorder = RUZEE.ShadedBorder.create({ corner:20, border:2 });
          <!-- $(if chap-id) -->
          <form name="sendin" action="<?php echo $linkloginonly; ?>" method="post">
                <input type="hidden" name="username" />
                <input type="hidden" name="password" />
                <input type="hidden" name="dst" value="<?php echo $linkorig; ?>" />
                <input type="hidden" name="popup" value="true" />

        <script type="text/javascript" src="./md5.js"></script>
        <script type="text/javascript">
            function doLogin() {
                <?php if(strlen($chapid) < 1) echo "return true;\n"; ?>
 document.sendin.username.value = document.login.username.value;
                document.sendin.password.value = hexMD5('<?php echo $chapid; ?>' + document.login.password.value + '<?php echo $chapchallenge; ?>');
                return false;

    <!-- $(endif) -->

<div id="content">
  <div id="innerholder">
    <h3 style="width: 330px;"><span style="width: 320px; margin-left: -6px;" ><span></span><hr></h3>
                <!--form action="#" method="post"-->

                <form name="login" action="<?php echo $linkloginonly; ?>" method="post" onSubmit="return doLogin()" >
                <input type="hidden" name="dst" value="<?php echo $linkorig; ?>" />
                <input type="hidden" name="popup" value="true" />

                <div id="label"><b>Username :</b></div>
                <div class="roundedfield" >
                    <input name="username" type="text" value="<?php echo $username; ?>" />
                <div id="label"><b>Password :</b></div>
                <div class="roundedfield" >
                    <input type="password" name="password" />
            <input type="submit" value="Login" id="loginbutton" name="loginbutton"/>
<!-- $(if error) -->
            <br /><div style="color: #FF8080; font-size: 11px"><?php echo $error; ?></div>
  <!-- $(endif) -->

<script language="javascript" type="text/javascript">  

then after that I connect a wifi AP (WAVION wbs2400) to one of LAN Port(ether2-ether10)
so when a wifi client try to have access to my hotpot with customize portal everything works perfect

But if I connect a Pc directly to one of LAN ports no way I cant get the login page
things stops here and no way to get the login page ...
Thanks To give me some help on this issue
You do not have the required permissions to view the files attached to this post.
User avatar
Forum Guru
Forum Guru
Posts: 1167
Joined: Sat Jun 06, 2009 4:54 am
Location: Australia

Re: strange issue with hotspot login page

Tue Mar 27, 2012 6:03 pm

Things to check (some of them are very simple but I'll run through them all regardless):
1. Can the router ping ?
2. Can the router ping (and resolve) ?
You can test a resolution by pasting this in terminal:
:put [:resolve]
3. Can the end users ping ?
4. Can the end users resolve ?

This should be enough to work out where the problem is occurring, then we can work out what needs to be changed to resolve it. | | MTCNA,MTCWE.MTCTCE | Give karma where due

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 144 guests