Re: netcat usage.
On 24/02/2014 10:21, Brian wrote: > the OP could consider doing (as root) > >setcap cap_net_bind_service=+ep /usr/bin/ncat > > as a solution to his problem. If they do, they should be aware that would essentially permit any user on the machine to bind to any port; since nc is a redirection system it can be paired with any daemon or program. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/530b7f2d.8040...@debian.org
Re: netcat usage.
On Mon 24 Feb 2014 at 20:18:16 +1100, Scott Ferguson wrote: > On 24/02/14 20:07, Zenaan Harkness wrote: > > I'd include socat in the list, but perhaps it's command line options > > are different? socat is my preferred network swiss army knife. > > > > A little different, but there are also netsed, netrw etc. > > And the excellent crypcat - but I just counted the ones with netcat in > their name (in case the OP was, um, fussy about it), not necessarily > their functionality. I don't know what the actual criteria for being > "netcat" is, for me if it does the job and is in /etc/alternatives I'm > happy. There is also ncat, which comes in the nmap package and is described as "a much-improved reimplementation of the venerable Netcat". This is what the OP is apparently using. He might also have nc aliased to ncat. I'd not previously come across the CAP_NET_BIND_SERVICE capability Pascal Hambourg mentions; the OP could consider doing (as root) setcap cap_net_bind_service=+ep /usr/bin/ncat as a solution to his problem. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20140224102150.ga8...@copernicus.demon.co.uk
Re: netcat usage.
On 24/02/14 20:07, Zenaan Harkness wrote: > I'd include socat in the list, but perhaps it's command line options > are different? socat is my preferred network swiss army knife. > > A little different, but there are also netsed, netrw etc. > > And the excellent crypcat - but I just counted the ones with netcat in their name (in case the OP was, um, fussy about it), not necessarily their functionality. I don't know what the actual criteria for being "netcat" is, for me if it does the job and is in /etc/alternatives I'm happy. Kind regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/530b0e58.4090...@gmail.com
Re: netcat usage.
I'd include socat in the list, but perhaps it's command line options are different? socat is my preferred network swiss army knife. A little different, but there are also netsed, netrw etc. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOsGNST1WYd9Dg3KCmqe5yzUgmQSq=oqao008whkh-1yel+...@mail.gmail.com
Re: netcat usage.
On 24/02/14 15:44, Peter Easthope wrote: > References: > <530a9882.4040...@gmail.com> > > From: Scott Ferguson > Date: Mon, 24 Feb 2014 11:55:30 +1100 >> NOTE: there four different "netcats" available in Wheezy. > > I found three. > netcat-openbsd, netcat-traditional, netcat6. OK. I miscounted transitional as a separate package. > > netcat-openbsd pleads ignorance. > peter@dalton:~$ nc -l 25 -e ssmtp > nc: invalid option -- 'e' > ... > > netcat-traditional listens on the port; or appears to and does nothing. > peter@dalton:~$ nc -l 25 -e ssmtp > [gears humming] What are the contents of the file "ssmtp"? > > netcat6 refuses. > peter@dalton:~$ nc -l -p 25 -e ssmtp "-p 25" is not the same as "-l 25" > nc: bind to source :: 25 failed: Permission denied > nc: bind to source 0.0.0.0 25 failed: Permission denied > nc: failed to bind to any local addr/port $ nc -lvv -p 1025 -w 2;nc -lvv -p 25 listening on [any] 1025 ... no connection : Connection timed out Can't grab 0.0.0.0:25 with bind : Permission denied (netcat-traditional 1.10-40) Kind regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/530b0a36.6080...@gmail.com
Re: netcat usage.
References: <530a9882.4040...@gmail.com> From: Scott Ferguson Date: Mon, 24 Feb 2014 11:55:30 +1100 > NOTE: there four different "netcats" available in Wheezy. I found three. netcat-openbsd, netcat-traditional, netcat6. netcat-openbsd pleads ignorance. peter@dalton:~$ nc -l 25 -e ssmtp nc: invalid option -- 'e' ... netcat-traditional listens on the port; or appears to and does nothing. peter@dalton:~$ nc -l 25 -e ssmtp [gears humming] netcat6 refuses. peter@dalton:~$ nc -l -p 25 -e ssmtp nc: bind to source :: 25 failed: Permission denied nc: bind to source 0.0.0.0 25 failed: Permission denied nc: failed to bind to any local addr/port From: Brian Date: Sun, 23 Feb 2014 23:17:04 + > You start a thread. You then respond to it and break the thread. > Do you do this by design? The browser doesn't have a means to include References in the header. Sorry. References are at the top of the message and I can include References in the header when mail is working again. More explanation here. https://wiki.debian.org/DebianMailingLists#Message_Threading_and_Replying From: Pascal Hambourg Date: Mon, 24 Feb 2014 00:22:10 +0100 [Binding to a port below 1024] just requires that the process has the CAP_NET_BIND_SERVICE capability. Thanks. With that tip I might make nc in netcat6 work. Regards,... Peter E. -- Telephone 1 360 639 0202. Bcc: peter at easthope.ca "http://carnot.yi.org/ " -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/42bd69db811dccd3eeed4805b25c7bd8.squir...@easthope.ca
Re: netcat usage.
On 24/02/14 07:49, Peter Easthope wrote: > References: <9802e1a04541ccc2a9d2c5d8b89c6c0f.squir...@easthope.ca> > <23022014193900.3e6e4cc30...@desktop.copernicus.demon.co.uk> > > I'll be putting References in the header again soon. > > From: Brian > Date: Sun, 23 Feb 2014 19:43:12 + >> Which netcat are you using? > > [user@computer ~]$ nc --version > Ncat: Version 6.40 ( http://nmap.org/ncat ) > >> Mine (which I will not reveal :) ) does does not offer -e as an option. > > -e is a contentious option? Contentious? "use with caution" (from the man) > Does anyone have it in Debian? Yes. In Wheezy with backports enabled netcat-traditional 1.10-40 NOTE: there four different "netcats" available in Wheezy. And, I can't connect to ports below 1024 as a user either. > > Regards, ... Peter > Kind regards -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/530a9882.4040...@gmail.com
Re: netcat usage.
David Glover-Aoki a écrit : > > Only the superuser can bind to ports below 1024. Actually not. It just requires that the process has the CAP_NET_BIND_SERVICE capability. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/530a82a2.50...@plouf.fr.eu.org
Re: Re(2): netcat usage.
On Sun 23 Feb 2014 at 12:49:30 -0800, Peter Easthope wrote: > References: <9802e1a04541ccc2a9d2c5d8b89c6c0f.squir...@easthope.ca> > <23022014193900.3e6e4cc30...@desktop.copernicus.demon.co.uk> > > I'll be putting References in the header again soon. > > From: Brian > Date: Sun, 23 Feb 2014 19:43:12 + > > Which netcat are you using? I asked a question - which you didn't answer. I'll ask another one after answering the two you ask. > [user@computer ~]$ nc --version > Ncat: Version 6.40 ( http://nmap.org/ncat ) > > > Mine (which I will not reveal :) ) does does not offer -e as an option. > > -e is a contentious option? Not so you would notice. Does anyone have it in Debian? -e? Yes. You start a thread. You then respond to it and break the thread. Do you do this by design? -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/23022014230902.3d8fab49d...@desktop.copernicus.demon.co.uk
Re(2): netcat usage.
References: <9802e1a04541ccc2a9d2c5d8b89c6c0f.squir...@easthope.ca> <23022014193900.3e6e4cc30...@desktop.copernicus.demon.co.uk> I'll be putting References in the header again soon. From: Brian Date: Sun, 23 Feb 2014 19:43:12 + > Which netcat are you using? [user@computer ~]$ nc --version Ncat: Version 6.40 ( http://nmap.org/ncat ) > Mine (which I will not reveal :) ) does does not offer -e as an option. -e is a contentious option? Does anyone have it in Debian? Regards, ... Peter -- Telephone 1 360 639 0202. Bcc: peter at easthope.ca "http://carnot.yi.org/ " -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/a7f1e371d326618f1b4877e7b9e45483.squir...@easthope.ca
Re: netcat usage.
On Sun, 23 Feb 2014 09:15:59 -0800 "Peter Easthope" wrote: > Ncat: bind to :::25: Permission denied. QUITTING. Only the superuser can bind to ports below 1024. -- David Glover-Aoki http://david.gloveraoki.net/contact signature.asc Description: PGP signature
Re: netcat usage.
On Sun 23 Feb 2014 at 09:15:59 -0800, Peter Easthope wrote: > Can anyone offer a solution for this? > > [user@computer ~]$ nc -l 25 -e /usr/sbin/ssmtp > Ncat: bind to :::25: Permission denied. QUITTING. Which netcat are you using? Mine (which I will not reveal :) ) does does not offer -e as an option. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/23022014193900.3e6e4cc30...@desktop.copernicus.demon.co.uk
Re: netcat usage.
"Peter Easthope" writes: > Can anyone offer a solution for this? > > [user@computer ~]$ nc -l 25 -e /usr/sbin/ssmtp > Ncat: bind to :::25: Permission denied. QUITTING. Maybe you need to be root? I doubt regular users can bind to ports below 1024. -- Mark -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/878ut1k8bl@ixod.org
netcat usage.
Can anyone offer a solution for this? [user@computer ~]$ nc -l 25 -e /usr/sbin/ssmtp Ncat: bind to :::25: Permission denied. QUITTING. Thanks,... Peter E. -- Telephone 1 360 639 0202. Bcc: peter at easthope.ca "http://carnot.yi.org/ " -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/9802e1a04541ccc2a9d2c5d8b89c6c0f.squir...@easthope.ca