redirect users to a website

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

Does the website IP change? You can use the [:resolve] command as in
http://forum.mikrotik.com/t/dynamic-dns-ftp-server/9182/1

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

i need that too

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

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


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

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…