Hotspot - redirect client to diferent ports

Hello people,
I am working hard in the hotspot server and i whould like how to redirect a client to port that I even indicate. This port will draw a html page that will contain two frames: one to display the logo of the company and the other to show the content requested by the customer.

How to do this?

Thanks!

Change the login.html file to redirect instead of loading the regular page..

example:

<html>
<title>...</title>
<body>
<form name="redirect" action="http://www.thepageyouwanttosendto.com:1337/cgi-bin/submit.cgi" method="post">
<input type="hidden" name="user" value="$(username)">
<input type="hidden" name="login_url" value="$(link-login)">
<input type="hidden" name="nas_address" value="$(server-address)">
<input type="hidden" name="nas_brand" value="mikrotik">
<input type="hidden" name="location" value="$(location-id)">
<input type="hidden" name="error" value="$(error)">
$(if trial == 'yes')<input type="hidden" name="trial" value="yes">$(endif)
<input type="hidden" name="mac" value="$(mac)">
<input type="hidden" name="ip" value="$(ip)">
<input type="hidden" name="hostname" value="$(hostname)">
<input type="hidden" name="link-orig" value="$(link-orig)">
</form>
<script language="JavaScript">
<!--
	document.redirect.submit();
//-->
</script>
</body>
</html>

Thanks, but I would like, even if the user was logged, would always be redirected to this page and not after the login.

You want them to always be redirected to that page? even if they are logged in?

If this is the case just set a dst-nat rule.

add chain=dst-nat src-address= dst-port=80 protocol=tcp action=dst-nat to-address= to-port=

I just did that from memory so it may be a little different.

I would like that page is on mikrotik server. I put page on mikrotik and i’l like redirect to this page.

Ex:
IP Server Mikrotik - 192.168.1.1/24

add chain=forward src-address=src-address-list protocol=tcp dst-port=80-443-53-8080-3128 action=redirect to-port=80

How do this?

Thanks home

you can’t put custom webpages on the router and redirect to them. ie. it’s not possible to do it.

as above

the only ways I see that you could do this are as follows:
a) redirect using nat rules
b) change the login page to suit
c) add in a script for “on user login” that redirects the http requests to that page for 1minute or so…

I want to put the webpage on mikrotik. I make a new port to listen request from client and redirect to page on mikrotik.

See the page:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Provider</title>
<script language="javascript">
if(parent.document.title == "Provider"){
parent.top.location.href="http://provider.com/index.html";
parent.main.location.href="$(link-orig)";
}
</script>
</head>

<frameset rows="80,*" frameborder="no" border="0" framespacing="0">
<frame src="http://provider.com/index.html" name="top" scrolling="No" id="top" noresize />
<frame src="$(link-orig)" name="main" scrolling="Auto" id="main" />
</frameset>
<noframes><body>
</body>
</noframes></html>

I would like this.

^see above

you can only modify the existing pages.

Can I do using live cd linux?

no you can’t. each device for it’s own purpose.

Ok, thanks home.