[K12OSN] Reading TCP packets

Julius Szelagiewicz julius at turtle.com
Wed Jul 23 21:40:18 UTC 2008


So, Sudev, you'd rather have a "conforming" email that one with an answer?
:-)


The mechanism you can use is the same one used for port redirection for
internet proxy. Below is my entry in nat table for proxy forwarding:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT
--to-destination 216.216.171.6:3128
iptables -t nat -A OUTPUT -p tcp --dport 80 -j DNAT --to-destination
216.216.171.6:3128

You would modify it by adding --source (your packet generator) and change
port for the listener. Piece of cake.
julius

On Wed, 23 Jul 2008, Sudev Barar wrote:

> This may not be correct place but collective wisdom can perhaps point
> me to a good resource.
>
> I have a remote device that is generating data and is sending as a TCP
> packet to designated IP:Port. If I open and set a non standard port I
> am able to receive the packets using a listener. Problem is that the
> host where I have to move this project allows listening only on port
> 80 (apache) or port 25/110 (mail) or port 22 (ssh)
>
> How can I set up apache or iptables to log in incoming data packets
> while at the same time allow apache to serve web pages?
>
> My google time continues to turn up inconclusive leads.
>
> --
> Regards,
> Sudev Barar
> Read http://blog.sudev.in for topics ranging from here to there.
>
> PS: I know most of people do not follow email niceties (mostly they
> are not aware) but if you follow bottom post/in-line post style of
> email conversations it becomes a whole lot easier to carry on
> meaningful dialogue and you can snip out what is not meaningful too.
> Most people just hit reply button and top post leaving prior message
> appended uselessly at bottom. See if you can adopt this style and
> persuade others. In case you are already doing this ..... great,
> spread the message.
>
> _______________________________________________
> K12OSN mailing list
> K12OSN at redhat.com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>




More information about the K12OSN mailing list