iptables: redirecting MAC address to squid

Issues related to configuring your network
Post Reply
wp.rauchholz
Posts: 130
Joined: 2016/11/20 11:58:45

iptables: redirecting MAC address to squid

Post by wp.rauchholz » 2021/01/05 12:23:56

I want to capture through iptables traffic originating from certain MACs and force them through squid.
I came up wit example underneath. I can implement it, but it does nto seem to do the job.
What do I need to change that all traffic from this HWADDr goes through port 3128?
This MAC address belongs to an iphone and I would like to redirect all traffic through 3128 and not only dport 80. How can I do that?

iptables -t nat -A PREROUTING -m mac --mac-source 3e:38:af:9c:92:9d -s $INT_NET -p tcp --dport 80 -j REDIRECT --to-port 3128

Thanks for your help.

Wolfgang

Post Reply

Return to “CentOS 7 - Networking Support”