Any iptables experts here, I need something explained
Karl Auer
kauer at biplane.com.au
Tue Oct 12 05:38:51 UTC 2021
On Mon, 2021-10-11 at 20:30 +0100, Chris Green wrote:
> What I can't understand is the iptables bits at the end of the script
> (I presumably copied it from somewhere!):-
>
> sudo iptables -F
> sudo iptables -t nat -F
> sudo iptables -t nat -A PREROUTING -s 10.42.0.0/24 -p tcp -j
> REDIRECT --to-ports 12345
>
Ignoring the first two lines, the third says "any TCP packet coming
from any address in the range 10.42.0.0/24 is to be forwarded to port
12345 at the destination address instead of whatever port it happens to
be addressed to". Since redsocks is listening on all interfaces, if
your laptop running redsocks is the destination address for such
packets, they will go to redsocks. I think. I'd expect some subset of
your devices to have addresses in that range. These addresses may be
being served by something such as an access point.
Do tell us when you figure it out :-)
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
GPG fingerprint: 61A0 99A9 8823 3A75 871E 5D90 BADB B237 260C 9C58
Old fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
More information about the ubuntu-users
mailing list