MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
24 25 26 27 28
29 30          
2020
Months
NovDec


Sat, Apr 04, 2009 3:32 pm

Socat and Ncat

I needed to determine whether User Datagram Protocol (UDP) datagrams were being transmitted through a firewall on specific ports. I had a Windows system behind the firewall and a Linux system on the outside of the firewall. I intended to use Ncat on both systems. I installed Nmap on the Windows system, since it provides the Ncat utility. But when I tried to install Ncat on the Linux system, I encountered problems, so I installed socat, instead, since it provides similar capabilities.

Since I needed to test whether UDP datagrams would reach the Windows system on port 27900, I issued the command ncat -u 27900 -l to have ncat listen (the "-l" argument) on UDP port 27900 (the -u 27900 argument). I then issued the command socat - udp-sendto:192.168.0.3:27900 on the Linux system. The - udp-sendto:192.168.0.3 allowed me to send data from the system socat was running on to the the destination address 192.168.0.3. I was then able to type text, e.g. the words "a test" on the Linux system. I saw them appear on the Windows system indicating the firewall rule was functioning as needed.

Linux Sending System

$ socat - udp-sendto:192.168.2.3:27900
a test

Windows Listening System

C:\Program Files\Network\Nmap>ncat -u 27900 -l
a test

I then terminated the socat program on the Linux system with Ctrl-D and the ncat program on the Windows system with Ctrl-C.

References:

  1. Nmap
  2. socat
    dest-unreach.org
  3. socat - Multipurpose relay (SOcket CAT)
    Linux Man Pages Manual Documentation for Linux / Solaris / UNIX / BSD

[/network/tools/scanning/socat] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo