Forward all traffic to webserver

Hello everybody,

i hope you can give me a hint how to achieve the following:

i have a turris omnia with a running local webserver.

I want to use the Router in a science exhibition. The Router has an open Wifi and i want to forward all requests in the browser to the local webserver.

I tried some firewalls rules but it did not work out.

Thanks in advance.

To clarify, you would like to have people connect to your router via wifi to get to your webserver which is the only thing on the router?

Is the router going to have internet access (perhaps for the web server)?

I’d look up how to forward all DNS queries to the web server’s LAN IP using kresd. Basically you will need to say your router is DNS for all the root entries. This is similar to a captive portal. Kresd is the default DNS server for Omnia. You will probably need to ssh into the router to set this up.

That way, someone tries to go to google.com, it will just resolve to your router’s LAN IP address.

If the web server needs to have access to the internet, but you don’t want anyone using your wifi to get to the internet, don’t bridge LAN to WAN. You should be able to do this using LuCI.

Hi jklaas,

thank you for your reply.

The guests connect to the router using a public wifi. The Router does not have an Internet connection. Ideally i can resolve the referer urls or GET variables from the url within my webserver.

Thank you very much.

OK, so for the DNS redirection, add custom config file with content:

policy.add(policy.all(policy.ANSWER(
	{ [kres.type.A] = { rdata=kres.str2ip('192.168.1.1'), ttl=300 } },
	true
)))

IT WORKS!

THANK YOU SOOOOO MUCH

thanks-thank-you

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.