Any iptables experts here, I need something explained
Chris Green
cl at isbd.net
Tue Oct 12 08:57:00 UTC 2021
On Tue, Oct 12, 2021 at 04:38:51PM +1100, Karl Auer wrote:
> 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.
>
Thanks, that helps a lot. The 10.42.0.0/24 bit had been confusing me
but I *think* it's simply the default IP that NetworkManager gives
interfaces when there's nothing else to set it.
> Do tell us when you figure it out :-)
>
Yes, will do, it did work a while ago (pre Covid) but other changes
have mis-configured it.
--
Chris Green
More information about the ubuntu-users
mailing list