Redirect through dnsmasq on raspberry pi 3

0

I am currently working with a raspberry that works as a server through flask.

It is connected through WiFi to external devices and all I need to do is to redirect the requests to the following local ip that is:

192.168.42.1:5000/wifi/schemes

I tried using dnsmasq and I found out that adding the following line to the dnsmasq.conf file it should do the trick:

address=/#/191.168.42.1

Anyway it doesn't work and I think it is because the server runs on port 5000, but if I type:

address=/#/191.168.42.1:5000/wifi/schemes

but it gives me error as the address seems to be invalid.

Do you have any suggestions?

piti-wity

Posted 2017-07-07T08:36:41.270

Reputation: 1

You seem to be mixing IP addresses and URLs. An IP address is an identifier for a device, while an URL is an identifier for a resource (like a file or directory) on that machine. You can't put an URL where an IP address is expected (because the program won't understand it). – Nathan.Eilisha Shiraini – 2017-07-07T08:47:42.417

It's not clear what you're trying to redirect; DNS requests or something else. It sounds like iptables would be the proper tool for the job you're trying to achieve. – Darren – 2017-07-07T08:57:25.690

No answers