Score:0

iptables doesn't redirect 443 to 8443 on local machine

cn flag

I want to redirect all the traffic from my computer from port 443 to port 8443. All the traffic is on the same machine. A proxy server is listening to port 8443 and i tried to add the following Rule:

sudo iptables -t nat -A PREROUTING -i wlp3s0 -p tcp --dport 443 -j REDIRECT --to-port 8443

But my proxy didn't get any package. wlp3s0 is my wifi adapter according to ifconfig. What did i wrong?

A.B avatar
cl flag
A.B
related: https://serverfault.com/questions/1065983/iptables-prerouting-not-in-effect .
Score:0
mv flag

If all your traffic is local traffic, so traffic originating from your computer, probably -i wlp3s0 is the culpit here.

Your traffic most likely does not get routed via the wlp3s0 interface, but rather via the lo ("loopback") interface.

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.