Page 1 of 1

redirect users to a website

Posted: Sun Dec 03, 2006 7:44 pm
by kolorasta
How can i redirect users to a website...

for example... they don't pay you, so you redirect every request to from this client to port 80 to http://www.youhavetopayme.com
it's easy to redirect to an ip, but i can't redirect to a website

my clientes are connected via dhcp... not hotspot.... i found an example doing this with clients connected via hotspot, but this is not my case.

Re: redirect users to a website

Posted: Sun Dec 03, 2006 9:55 pm
by balimore
How can i redirect users to a website...

for example... they don't pay you, so you redirect every request to from this client to port 80 to http://www.youhavetopayme.com
it's easy to redirect to an ip, but i can't redirect to a website

my clientes are connected via dhcp... not hotspot.... i found an example doing this with clients connected via hotspot, but this is not my case.
----
Hello kolo...
DHCP-server Plus! [hotspot] or local webserver will help you to pointng your user.

regards
Hasbullah.com
----

Re: redirect users to a website

Posted: Mon Dec 04, 2006 12:27 am
by GWISA
How can i redirect users to a website...

it's easy to redirect to an ip, but i can't redirect to a website
Does the website IP change? You can use the [:resolve] command as in
http://forum.mikrotik.com/viewtopic.php ... ht=resolve

Re: redirect users to a website

Posted: Mon Dec 04, 2006 1:27 am
by kolorasta
How can i redirect users to a website...

it's easy to redirect to an ip, but i can't redirect to a website
Does the website IP change? You can use the [:resolve] command as in
http://forum.mikrotik.com/viewtopic.php ... ht=resolve
the website ip doesn't change... but in the server there are lot of websites hosted. so if i redirect to an ip, my webserver provider's page is shown

Posted: Mon Dec 04, 2006 2:30 am
by 111111
i need that too

Posted: Mon Dec 04, 2006 4:26 am
by GotNet
I don't use this now but I had setup a simple apache on Windows just for the no-pay page on an old PC.

Posted: Mon Dec 04, 2006 5:01 am
by balimore
I don't use this now but I had setup a simple apache on Windows just for the no-pay page on an old PC.
----
yes, you are right...
from started 15 moths ago, i used simple apache server[local webserver] to handle it..... and i don't want all internal interfaces shows from public or local networks. i think easy to talking about, but not easy to make more secure all interfaces. :wink:

regards
Hasbullah.com
----

Posted: Mon Dec 04, 2006 5:53 am
by kolorasta
yes, it works if you have a local webserver on any pc in your lan,,, because you redirect client's port 80 request to the ip of your web server... Besides you can configure your pay-me-if-you-want-internet website in a different port, ex. port 88 or 8080... and leave port 80 for other purposes.

redirect request to an ip/port only works fine if the site is hosted in a dedicated server with an ip for it own... ex.. google.com

if you type in your browser google.com or http://64.233.187.99, it´s the same, but if you type for ex. vialedigital.com.ar it's not the same to type the ip of that site http://200.32.5.205

Posted: Mon Dec 04, 2006 6:21 am
by balimore
yes, it works if you have a local webserver on any pc in your lan,,, because you...................e to type the ip of that site http://200.32.5.205
----
or will turn on dhcp-hotspot than edit your 'login.html', i think you are doing without more $$ for local server. and make smart networks for user
easy.....!!!!

regards
Hasbullah.com
----

Posted: Mon Dec 04, 2006 7:19 am
by jo2jo
hey,

This is what I do and it works great...even across net.:

firewall rule:

I just do a dstnat rule with the src address of the Non paying client...protocol TCP, Src port 1-60000

The action is dst-nat of the IP and PORT of the web server you are running..locally or across the net.

let me know if you have probs..ive been using this for a while to block access to non paying users...


edit: oh the key is setting ALL the Apache error pages (404 mainly) to your index.html

if you dont do this then if someone types in http://www.google.com/whatever.html they will get a page not found since yourWEBserver.com/whatever.html is not found...