R
R
rubtsoff2017-07-06 19:45:46
linux
rubtsoff, 2017-07-06 19:45:46

How to redirect all pages to a local page?

There is a computer with Debian OS, you need to make it so that when a request is sent to any site, it will be redirected to a local page (191.168.0.20:5000/start)
through dnsmasq but give an error Bad argument `--dport'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Reversaidx, 2017-07-07
@Reversaidx

You can try to configure through nat something like
ptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 5000
ptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT - -to-ports 5000

V
Vladimir Zhurkin, 2017-07-07
@icCE

You came from the wrong side. You need to set up a dns server, for example Bind and set it up in a non-view in such a way that for clients from such a network, one web server address will always be returned for all requests.
On this web server, it will already be possible to configure authorization, after which the PC will be removed from the server's view bind list and the Internet will work for it. This is such a common version of hotspot.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question