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 = 172.18.0.2/22 Connected with ISP router
default Router = 172.18.0.1
#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 = 192.168.182.1/24 Connected with LAN/Hotspot users
/ip address add address=172.18.0.2/22 comment=WAN disabled=no interface=ether1 network=172.18.0.0
/ip address add address=192.168.182.1/24 comment=LAN disabled=no interface=LAN network=192.168.182.0
/ip pool add name=hs-pool-1 ranges=192.168.182.2-192.168.182.254
/ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=250000KiB max-udp-packet-size=512 servers=172.16.0.5
/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=192.168.182.0/24 comment="hotspot network" gateway=192.168.182.1
/ip hotspot profile
set default dns-name="" hotspot-address=0.0.0.0 html-directory=hotspot http-cookie-lifetime=1d http-proxy=0.0.0.0:0 login-by=cookie,http-chap name=default rate-limit="" smtp-server=0.0.0.0 split-user-domain=no use-radius=no
add dns-name="" hotspot-address=192.168.182.1 html-directory=hotspot http-cookie-lifetime=1d http-proxy=0.0.0.0:0 login-by=cookie,http-chap,mac name=hsprof1 rate-limit="" smtp-server=0.0.0.0 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=192.168.182.1
/ip hotspot walled-garden ip add action=accept disabled=no dst-address=172.18.0.1
/ip hotspot walled-garden add dst-host=mhotspot.guineanet.net dst-port=443 action=allow
/radius add service=hotspot address=172.16.0.5 secret=myveryweaksecret
/ip firewall nat add action=masquerade chain=srcnat disabled=no
/ip route add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=172.18.0.1 scope=30 target-scope=10
till now everything works great so I set a redirect with customization of
login.html
<html>
<head><title>...</title></head>
<body>
$(if chap-id)
<noscript>
<center><b>JavaScript required. Enable JavaScript to continue.</b></center>
</noscript>
$(endif)
<center>If you are not redirected in a few seconds, click 'continue' below<br>
<form name="redirect" action="https://mhotspot.guineanet.net/" 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">
</form>
<script language="JavaScript">
<!--
document.redirect.submit();
//-->
</script></center>
</body>
</html>
and My webserver(172.16.0.5)
<?php
$mac=$_POST['mac'];
$ip=$_POST['ip'];
$username=$_POST['username'];
$linklogin=$_POST['link-login'];
$linkorig=$_POST['link-orig'];
$error=$_POST['error'];
$chapid=$_POST['chap-id'];
$chapchallenge=$_POST['chap-challenge'];
$linkloginonly=$_POST['link-login-only'];
$linkorigesc=$_POST['link-orig-esc'];
$macesc=$_POST['mac-esc'];
?>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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 });
</script>
</head>
<body>
<!-- $(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" />
</form>
<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; ?>');
document.sendin.submit();
return false;
}
//-->
</script>
<!-- $(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>
<div id="label"><b>Username :</b></div>
<div class="roundedfield" >
<input name="username" type="text" value="<?php echo $username; ?>" />
</div>
</div>
<div>
<div id="label"><b>Password :</b></div>
<div class="roundedfield" >
<input type="password" name="password" />
</div>
</div>
<input type="submit" value="Login" id="loginbutton" name="loginbutton"/>
<!-- $(if error) -->
<br /><div style="color: #FF8080; font-size: 11px"><?php echo $error; ?></div>
<!-- $(endif) -->
</form>
</div>
</div>
<script language="javascript" type="text/javascript">
holderBorder.render('content');
<!--
document.login.username.focus();
//-->
</script>
</body>
</html>
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
http://192.168.182.1/login?dst=http%3A%2F%2Fwww.google.fr%2F
Thanks To give me some help on this issue
