The transmission of all packets to the same address and port in ubuntu

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
In the footsteps of the previous question

1.The enterprise network with a Windows proxy for the Internet
2. With Ubuntu server, which communicates with this proxy utility cntlm. This utility listens to (its the same we specify in http_proxy) and then she communicates with the Windows proxy (authenticated etc.).
3.Some things on the server with Ubuntu do not work for example, fopen() in php
Is it possible to redirect all network packets to and will it help?
For example, using iptables
Email details, with the expectation of LAMERnewbie.
by | 13 views

3 Answers

0 like 0 dislike
in my understanding it should be something like this:
iptables-t nat -A POSTROUTING -i eth* -p tcp --dport 80 -j DNAT --to-destination
but check is not possible.
0 like 0 dislike
though probably more correct so:
iptables-t nat -A OUTPUT-p tcp --dport 80 -j DNAT --to-destination
0 like 0 dislike
First, the "all ports" to redirect, it won't help. Will help only those with whom they allow to run proxy "on that end". That is, if allowed to CONNECT to 25th port, the SMTP will work, but this port is almost never allowed, etc.
Second rule to redirect http traffic to a transparent proxy:
iptables-t nat -A OUTPUT-p tcp --dport 80 -j REDIRECT --to-ports 6666
if you want, you can stick to a rule, several ports for example 443: -p tcp -m multiport --dports 80,443

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
36,565 users