Score:0

iptables forward all traffic except one

in flag

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

Score:0
in flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.