Debian ports reporting closed. Refused connection


 
Thread Tools Search this Thread
Special Forums IP Networking Debian ports reporting closed. Refused connection
# 1  
Old 09-15-2013
Debian ports reporting closed. Refused connection

Hey guys, I'm having trouble with checking what ports are open on my Debian distro, which is reporting all ports closed, though they are clearly open

I am checking to see if ports are open with netcat:

Code:
nc 127.0.0.1 80
localhost [127.0.0.1] 80 (http) : Connection refused

As an example but on all ports that I test.
Any ideas what is causing this as the same issue is screwing with my ability to use SSH.

Tried the same thing on a printer on my LAN, checked the ports are open with nmap, same command with netcat and the same result.

Any help much appreciated.

Last edited by 3therk1ll; 09-15-2013 at 05:02 PM.. Reason: Missed something
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How keep running a program n an another computer via a connection ssh when the connection is closed?

Hi everybody, I am running a program on a supercomputer via my personal computer through a ssh connection. My program take more than a day to run, so when I left work with my PC I stop the connection with the supercomputer and the program stop. I am wondering if someone know how I can manage... (2 Replies)
Discussion started by: TomTomGre
2 Replies

2. Debian

ftp connection refused

I have two computers running Debian 6.0 and one running Solaris 2.6 on a private network. The Debian computers can ftp to the Solaris computer but if a Debian computer is the destination the ftp connection is refused. I assume this is some security feature of Debian. What can I do to allow... (2 Replies)
Discussion started by: snorkack59
2 Replies

3. UNIX for Advanced & Expert Users

ftp connection refused

Hi- While trying ftp from AIX to Windows im getting below error. Can anyone share ur views on this topic. root@AB101# ftp -n 10.192.168.68 ftp: connect: A remote host refused an attempted connect operation. ftp> Thanks. (3 Replies)
Discussion started by: yanis
3 Replies

4. UNIX and Linux Applications

PSQLException: Connection refused

I dont' what happened with my servers (test servers only) but I just noticed that suddenly I cannot up the domain anymore (Sun Java System Application Server 9.1_01). a. server.log org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the... (1 Reply)
Discussion started by: lhareigh890
1 Replies

5. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

6. Programming

echo: Connection refused

OS : Solaris sparc In c program After socket created when I do Connect() it results "Connection refused", but the system is online and I am able to do telnet, ping everything, but it says connection refused. What would need to correct ? (6 Replies)
Discussion started by: satish@123
6 Replies

7. UNIX for Dummies Questions & Answers

ssh_exchange_identification: Connection closed by remote host Connection closed

Hi Everyone, Good day. Scenario: 2 unix servers -- A (SunOS) and B (AIX) I have an ftp script to sftp 30 files from A to B which happen almost instantaneously i.e 30 sftp's happen at the same time. Some of these sftp's fail with the following error: ssh_exchange_identification: Connection... (1 Reply)
Discussion started by: jeevan_fimare
1 Replies

8. IP Networking

Connection refused

Hi there, Anything will help. I have running server on computer and want to connect from some clients. Server: memset(&hints, 0, sizeof(hints)); hints.ai_family = domain; hints.ai_socktype = SOCK_STREAM; error = getaddrinfo("localhost", "8300", &hints, &res0); if (error) { ... (1 Reply)
Discussion started by: Dudu1984
1 Replies

9. UNIX for Dummies Questions & Answers

Closed ports

Hello I need to close some ports on a box Solaris 8, which command I need to use. Thanks for your replies (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

10. SCO

telnet connection refused

I installed Openserver 5.0.7 and I cannot telnet to the localhost and I can't telnet from my old SCO 3.2.42 to the new SCO machine but I can ping the new machine and it will telnet to the old machine. (2 Replies)
Discussion started by: printrick
2 Replies
Login or Register to Ask a Question
NC(1)							    BSD General Commands Manual 						     NC(1)

NAME
nc -- arbitrary TCP and UDP connections and listens SYNOPSIS
nc [-e command] [-g intermediates] [-G hopcount] [-i interval] [-lnrtuvz] [-o filename] [-p source port] [-s ip address] [-w timeout] [hostname] [port[s...]] DESCRIPTION
The nc (or netcat) utility is used for just about anything under the sun involving TCP or UDP. It can open TCP connections, send UDP pack- ets, listen on arbitrary TCP and UDP ports, do port scanning, and source routing. Unlike telnet(1), nc scripts nicely, and separates error messages onto standard error instead of sending them to standard output, as telnet(1) does with some. Destination ports can be single integers, names as listed in services(5), or ranges. Ranges are in the form nn-mm, and several separate ports and/or ranges may be specified on the command line. Common uses include: o simple TCP proxies o shell-script based HTTP clients and servers o network daemon testing o source routing based connectivity testing o and much, much more The options are as follows: -e command Execute the specified command, using data from the network for stdin, and sending stdout and stderr to the network. This option is only present if nc was compiled with the GAPING_SECURITY_HOLE compile time option, since it allows users to make arbitrary programs available to anyone on the network. -g intermediate-host Specifies a hop along a loose source routed path. Can be used more than once to build a chain of hop points. -G pointer Positions the "hop counter" within the list of machines in the path of a source routed packet. Must be a multiple of 4. -i seconds Specifies a delay time interval between lines of text sent and received. Also causes a delay time between connections to multiple ports. -l Is used to specify that nc should listen for an incoming connection, rather than initiate a connection to a remote host. Any host- name/IP address and port arguments restrict the source of inbound connections to only that address and source port. -n Do not do DNS lookups on any of the specified addresses or hostnames, or names of port numbers from /etc/services. -o filename Create a hexadecimal log of data transferred in the specified file. Each line begins with ``<'' or ``>''. ``<'' means "from the net" and ``>'' means "to the net". -p port Specifies the source port nc should use, subject to privilege restrictions and availability. -r Specifies that source and/or destination ports should be chosen semi-randomly instead of sequentially within a range or in the order that the system assigns. -s hostname/ip-address Specifies the IP of the interface which is used to send the packets. On some platforms, this can be used for UDP spoofing by using ifconfig(8) to bring up a dummy interface with the desired source IP address. -t Causes nc to send RFC854 DON'T and WON'T responses to RFC854 DO and WILL requests. This makes it possible to use nc to script telnet sessions. The presence of this option can be enabled or disabled as a compile-time option. -u Use UDP instead of TCP. On most platforms, nc will behave as if a connection is established until it receives an ICMP packet indi- cating that there is no program listening to what it sends. -v Verbose. Cause nc to display connection information. Using -v more than once will cause nc to become even more verbose. -w timeout Specifies the number of seconds nc should wait before deciding that an attempt to establish a connection is hopeless. Also used to specify how long to wait for more network data after standard input closes. -z Specifies that nc should just scan for listening daemons, without sending any data to them. Diagnostic messages about refused con- nections will not be displayed unless -v is specified twice. EXAMPLES
nc Wait for the user to type what would normally be command-line arguments in at stdin. nc example.host 42 Open a TCP connection to port 42 of example.host. If the connection fails, do not display any error messages, but simply exit. nc -p 31337 example.host 42 Open a TCP connection to port 42 of example.host, and use port 31337 as the source port. nc -w 5 example.host 42 Open a TCP connection to port 42 of example.host, and time out after five seconds while attempting to connect. nc -u example.host 53 Send any data from stdin to UDP port 53 of example.host, and display any data returned. nc -s 10.1.2.3 example.host 42 Open a TCP connection to port 42 of example.host using 10.1.2.3 as the IP for the local end of the connection. nc -v example.host 42 Open a TCP connection to port 42 of example.host, displaying some diagnostic messages on stderr. nc -v -v example.host 42 Open a TCP connection to port 42 of example.host, displaying all diagnostic messages on stderr. nc -v -z example.host 20-30 Attempt to open TCP connections to ports 20 through 30 of example.host, and report which ones nc was able to connect to. nc -v -u -z -w 3 example.host 20-30 Send UDP packets to ports 20-30 of example.host, and report which ones did not respond with an ICMP packet after three seconds. nc -l -p 3000 Listen on TCP port 3000, and once there is a connection, send stdin to the remote host, and send data from the remote host to stdout. echo foobar | nc example.host 1000 Connect to port 1000 of example.host, send the string "foobar" followed by a newline, and move data from port 1000 of example.host to std- out until example.host closes the connection. SEE ALSO
cat(1), telnet(1) The netcat README. AUTHOR
*Hobbit* [hobbit@avian.org] BSD
August 1, 1996 BSD