A
A
Akmal Umarov2017-05-10 14:49:14
iptables
Akmal Umarov, 2017-05-10 14:49:14

Redirect all traffic to webserver?

Condition: there is a router (OpenWRT) with a web server installed on it.
Task: redirect the traffic of all users (connected via wifi) to the web server.
How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bonio, 2017-05-30
@Bonio

That is, so that when entering any site, the user gets to your page? If so, then this should work, on port 8000 your server, instead of br-lan - wifi interface.
iptables -t nat -A PREROUTING -i br-lan -p tcp --dport 80 -j REDIRECT --to-port 8000

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question