Jump to content

Recommended Posts

Posted

Hi, 

I wonder if there exists one method to make the end user a friendly way to access the web server. So I have Armbian with hotspot enabled, if I want to look at specific web page running on the board, I have to know the IP of the wlan0 and specific port of the web server. For example in google chrome I have to insert:  http://172.24.1.1:3000

This is very difficult for end user, who has minimal knowledge.  Is there any way, that for example you log on the hotspot, then open google chrome and start browse for any arbitrary page (let's say www.google.com) at port 80 and then it's automatically redirected to port 3000, except for all other web servers on the same IP. If I write 172.24.1.1:9090 it may not redirect. 

Posted

Try entering this command as root:

iptables -t nat -A PREROUTING -i wlan0 -p tcp --destination-port 80 -j REDIRECT --to-port 3000

Replace "wlan0" with the name of your wireless interface. If the command works for your purpose, you can put it inside "/etc/rc.local" to auto run at boot. 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines