FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 04-04-2008, 06:24 PM
"ml@bortal.de"
 
Default Netcat echo mode

Hello,

i would like to send some data from a netcat client to a netcat server.
Can you set up the netcat server so that it echos what he recieves?

Background: I would like to test my firewall setup if all my open ports
(tcp and udp) work. So i want to send some data and check if the same
data comes back.

Can netcat do that? (no i dont want to use nmap )

Thanks, Mario


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-04-2008, 08:05 PM
Peter Garrett
 
Default Netcat echo mode

On Fri, 04 Apr 2008 20:24:16 +0200
"ml@bortal.de" <ml@bortal.de> wrote:

> i would like to send some data from a netcat client to a netcat server.
> Can you set up the netcat server so that it echos what he recieves?

As I understand it, netcat acts as both a client and server, effectively,
depending on which end you look at it from So I'm not sure what you mean
here.

> Background: I would like to test my firewall setup if all my open ports
> (tcp and udp) work. So i want to send some data and check if the same
> data comes back.
>
> Can netcat do that? (no i dont want to use nmap )

You can use netcat ( nc ) to "scan" ports - for example:

nc -w 2 -z name-or-IP 80

checks if the system at "name-or-IP" is listening on port 80 . The -w
option is a "timeout" in seconds. If successful, nc exits silently. If
not, you see an error message.

For example:

$ nc -w 2 -z archive.ubuntu.com 80 # OK - silent exit
$ nc -w 2 -z archive.ubuntu.com.bogus 80
archive.ubuntu.com.bogus: forward host lookup failed: Unknown host :
Connection timed out


Peter

--
"INX Is Not X" Live CD based on Ubuntu 7.04 : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 04-04-2008, 11:45 PM
"ml@bortal.de"
 
Default Netcat echo mode

Hi Peter,



Peter Garrett schrieb:

On Fri, 04 Apr 2008 20:24:16 +0200
"ml@bortal.de" <ml@bortal.de> wrote:



i would like to send some data from a netcat client to a netcat server.
Can you set up the netcat server so that it echos what he recieves?



As I understand it, netcat acts as both a client and server, effectively,
depending on which end you look at it from So I'm not sure what you mean
here.



Background: I would like to test my firewall setup if all my open ports
(tcp and udp) work. So i want to send some data and check if the same
data comes back.

Can netcat do that? (no i dont want to use nmap )



You can use netcat ( nc ) to "scan" ports - for example:


I actually do not want to find open port, but test if my open ports can
be reached (UDP and TCP).



nc -w 2 -z name-or-IP 80

checks if the system at "name-or-IP" is listening on port 80 . The -w
option is a "timeout" in seconds. If successful, nc exits silently. If
not, you see an error message.

For example:

$ nc -w 2 -z archive.ubuntu.com 80 # OK - silent exit
$ nc -w 2 -z archive.ubuntu.com.bogus 80
archive.ubuntu.com.bogus: forward host lookup failed: Unknown host :
Connection timed out



A UDP Port never replies by default. Thats why i need some
client/server setup to check if the udp port is really open (or better:
if the udp port is allowed by the firewall inbetween!)



Thanks, Mario



Peter








--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 03:21 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org