On Thu, 1 May 2025, Tim Woodall wrote:
On Wed, 30 Apr 2025, Mohsen Pahlevanzadeh wrote:
On 4/30/25 4:29 PM, Jonathan Dowland wrote:
On Wed Apr 30, 2025 at 10:19 AM BST, Mohsen Pahlevanzadeh wrote:
I want to send any packet to 127.0.0.1:7777 and it sends my packets to
internet. my outgoing interface is eth0.
You can use socat? to listen on a port and forward received packets
elsewhere. But?
I don't want to use set proxy in firefox and other application, but I
want to send any packets to 127.0.0.1:7777 and my program itself send to
eth0.
But to what address on the Internet do you wish the packets to go?
Any destination. When packets are released from 127.0.0.1:7777 , No
difference to which dst.
It's not available in the default debian package but have a look at how squid
can do this when it's an intercepting proxy. (--with-openssl to configure i
think)
It uses the (must be local) nat rules to work out where the packet was
originally intended for.
Make the squid host the default route for your traffic.
On the squid host, nat everything to the proxy port
Now I'm not posting in my sleep :-) I suspect that squid handles this in
the regular debian package too when configured as a transparent proxy.
The changes are only necessary if you want to do egress filtering of
https.
Tim.