0

I am configuring my raspberry pi running Raspbian as a WIFI access point

using iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE to forward all traffic to ethernet and give wifi clients internet access

How do I make it so that if any client makes a request to a specific ip and port 10.10.10.10:8080 for example it will be forwarded to 127.0.0.1:8080 to be processed by a local http server running on the pi

if its easier I am ok with forwarding all traffic on port 8080 to 127.0.0.1:8080

1 Answer 1

0

an answer that didnt work for this question https://serverfault.com/a/991336/948403 worked for me.

Adding iptables -t nat -A PREROUTING -p tcp -d 192.168.2.X --dport 80 -jDNAT --to-destination 10.23.220.88:80 in addition to the iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE works as expected

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .