[K12OSN] Reading TCP packets

Sudev Barar sbarar at gmail.com
Wed Jul 23 17:05:33 UTC 2008


2008/7/23 "Terrell Prudé Jr." <microman at cmosnetworks.com>:
>> 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.
>>
> If you're sniffing, which is what it sounds like you're doing, then it
> doesn't matter which "port you have open."  You don't need to have any
> "ports open" on your sniffer.  Rob Owens suggested Wireshark, and I
> agree with him.  TCPDump is another good sniffer.

No I am not sniffing. The remote device can be set to send packets to
any IP:Port combination. So I just opened a random high port in my
firewall and used "nc" to read the packets at that port. Then another
program takes over and process these and log them on to database.

Now problem is after establishing proof of concept on my laptop I need
to run this system on a web-host and that host only has ports
mentioned open.

-- 
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.




More information about the K12OSN mailing list