After running the following command:  nmap -v -p 515 127.0.0.1   Ubuntu Show this Message:  PORT    STATE  SERVICE 515/tcp closed printer   How To Change Closed to Open ?
102877
For services list on my Ubuntu, Printer service not found on port 515.  nmap -sT -O localhost  PORT     STATE SERVICE 23/tcp   open  telnet 139/tcp  open  netbios-ssn 445/tcp  open  microsoft-ds 631/tcp  open  ipp 9050/tcp open  tor-socks Device type: general purpose Running: Linux 3.X OS CPE: cpe:/o:linux:linux_kernel:3 OS details: Linux 3.12 - 3.19, Linux 3.8 - 3.19       There is no Printer service on port 515. How to add Printer service on port 515?     nmap -v -p 515 127.0.0.1  Starting Nmap 7.01 ( https://nmap.org ) at 2016-11-19 13:03 IRST Initiating SYN Stealth Scan at 13:03 Scanning localhost (127.0.0.1) [1 port] Completed SYN Stealth Scan at 13:03, 0.21s elapsed (1 total ports) Nmap scan report for localhost (127.0.0.1) Host is up (0.000065s latency). PORT    STATE  SERVICE 515/tcp closed printer
649
As a follow up to a , I wonder why it is impossible in Java, without attempting reading/writing on a TCP socket, to detect that the socket has been gracefully closed by the peer? This seems to be the case regardless of whether one uses the pre-NIO Socket or the NIO SocketChannel.  When a peer gracefully closes a TCP connection, the TCP stacks on both sides of the connection know about the fact. The server-side (the one that initiates the shutdown) ends up in state FIN_WAIT2, whereas the client-side (the one that does not explicitly respond to the shutdown) ends up in state CLOSE_WAIT. Why isn't there a method in Socket or SocketChannel that can query the TCP stack to see whether the underlying TCP connection has been terminated? Is it that the TCP stack doesn't provide such status information? Or is it a design decision to avoid a costly call into the kernel?  With the help of the users who have already posted some answers to this question, I think I see where the issue might be coming from. The side that doesn't explicitly close the connection ends up in TCP state CLOSE_WAIT meaning that the connection is in the process of shutting down and waits for the side to issue its own CLOSE operation. I suppose it's fair enough that isConnected returns true and isClosed returns false, but why isn't there something like isClosing?  Below are the test classes that use pre-NIO sockets. But identical results are obtained using NIO.  import java.net.ServerSocket; import java.net.Socket;  public class MyServer {   public static void main(String[] args) throws Exception {     final ServerSocket ss = new ServerSocket(12345);     final Socket cs = ss.accept();     System.out.println("Accepted connection");     Thread.sleep(5000);     cs.close();     System.out.println("Closed connection");     ss.close();     Thread.sleep(100000);   } }   import java.net.Socket;  public class MyClient {   public static void main(String[] args) throws Exception {     final Socket s = new Socket("localhost", 12345);     for (int i = 0; i &lt; 10; i++) {       System.out.println("connected: " + s.isConnected() +          ", closed: " + s.isClosed());       Thread.sleep(1000);     }     Thread.sleep(100000);   } }   When the test client connects to the test server the output remains unchanged even after the server initiates the shutdown of the connection:  connected: true, closed: false connected: true, closed: false ...
96729
I just jumped into a command line virtual console using Ctrl-Alt-F1, and i would now like to return to the gui. startx gives me something along the lines of 'this server is already active for display 0' if ...etc. it gives me a command to remove /tmp/.X0lock if that isn't the case...I could just restart the machine, but i'm worried i might mess something up.
29989
Using 12.04 my printer a canon ip2600 will not print.   SystemSettings/printers shows it as installed, connected to local host, enabled, accepting jobs, shared and allowing printing for everyone. Yet it does not print.   I have tried to remove it but get a request for user name and password which I enter (I only have one password) but the password is listed as incorrect.   I need a sudo command which I can use to delete the printer so I can attempt to re-install it. As it is the printer is useless and I can not even uninstall it.
44503
I have a problem starting the Apache Service in WAMP Server, when i test port 80, I get the following message on the console  Your port 80 is actually used by : Server: Microsoft -HTTPAPI/2.0   Things i did:  used netstat -aon from the command prompt to check what is running on port 80 and i get something with a PID of 4.  This PID of 4 corresponds to a file named - ntoskrnl (NT Kernel &amp; System) in C:\Windows\System32  How do I go about solving this issue?
70106
Our setup is as follows:  Two offices (A and B) connected with OpenVPN Access Server.  One Windows Server 2008 R2 Standard    Housed in remote datacenter. Terminals at both offices connect through RDP in order to use a particular piece of software concurrently. Network Connected printers (Deployed with GPO) that are connected to separate terminals at each office (and shared) are used with this software to print things throughout the day.   We are experiencing extremely slow printing times.  Opening printer properties can take 30-60 seconds and printing times range from 30-180 seconds with no apparent reason.  File sizes remain &lt; 1mb.  This happens with each of our printers.  All different models.  The server massively underutilized with a 6-core AMD, 16GB ram, 4x 120GB SSDs, and a 100 megabit port.  Our VPN does not seem to be a bottleneck either.  I've been attempting to find ways to increase print speed.  So far no success.  What can you advise?
28430
I have problem (seems to be trivia) about Ubuntu Terminal. Once my network connection slow down then it (sometimes but very rare to happened) showed some information like this.     I shocked because I have been got 2,919 PB/s. Sorry my mouse block some part of letter 'P' (I actually rush to print screen) but I believe you can recognize it.    EDIT    based on answer given to me, and I got similar info then, I'd like to add more clearly new image after.    Can someone explain it to me?  Best Regards!
123604
Can someone please help me to install brother dcp195c drivers on Ubuntu v12?  Using the default driver, the printer says that it is receiving data but nothing happens.
92951
I've tried to open port 8605 on my server (used for socket connections) using:  iptables -I INPUT 2 -s 0/0 -p tcp --dport 8605 -j ACCEPT   However the change is not persisting, the port closes itself once a day (I assume something is being regularly reloaded).  How can I make my change persist?  EDIT  Despite saving it, the change does not persist, each day it needs to be corrected.  Crontab does not seem to have any obvious changes, and the server is not restarting. Any ideas?  EDIT  I found out that iptables was running under  so I needed to updated the rules in there.
19060
I have Windows 10 Anniversary Edition with "Bash on Ubuntu on Windows" installed and working. I'd like to be able to SSH into this Ubuntu instance, but although I have openssh-server installed and configured (and listening on port 2200), when I try to ssh to "localhost:2200", it tells me "Server unexpectedly closed network connection".  Has anyone been able to successfully accomplish this?
3374
While upgrading today, something caused my wireless network manager to disappear. Not even connecting via wired connection.  This error is being shown by files:  **(nm-applet:2716): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files   (nm-applet:2716): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid   (nm-applet:2716): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries   (nm-applet:2716): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files    Is there a patch I can download through windows and send through to my ubuntu, or is it a case of having to reload everything? I tried running two versions back but still no internet access.
100653
When  using Postfix and IMAP on a mailserver, at least 3 ports are usually opened  25 smtp   : incoming emails from anybody (whole internet) 465 smtps : outgoing emails from authorized users (to the whole intenet) 993 imap  : imap for authorized users   I would like to configure postfix, so that authorized users can only send email through 465. By default this is not so. Users can also use STARTTLS over port 25. I would like to disable that.  My plan is to use port 25 for the public sending me email  use port 465 for my users (I can use firewall to allow specific IP ranges, or use custom port)  This would prevent port 25 being exploitable from brute force attacks, where hackers try to guess user/password. Port 25 simply would not accept user/password, even if it were valid. And since port 465 is restricted by firewall, hackers cannot exploit 465 either.  Is this possible in Postfix?  I am using Postfix 2.9.6-2 on Debian Wheezy
10919
I'm sure this is very noobish, so forgive me. I'm trying to run a node.js server on port 8080 of my ubuntu 10.04.  Here's the result of iptables -L on the server:  Chain INPUT (policy ACCEPT) target     prot opt source               destination           Chain FORWARD (policy ACCEPT) target     prot opt source               destination           Chain OUTPUT (policy ACCEPT) target     prot opt source               destination   And here's the result of nmap -p 8080 (edited the ip address because everything is or should be wide open)  nmap 173.203.xxx.xxx -p 8080 -A  Starting Nmap 5.00 ( http://nmap.org ) at 2011-05-19 22:52 PDT Interesting ports on xxx (173.203.xxx.xxx): PORT     STATE  SERVICE    VERSION 8080/tcp closed http-proxy   Why on earth is 8080 seen as closed? Adding this did not help:  iptables -A OUTPUT -p tcp  --dport 8080 -j ACCEPT iptables -A INPUT -p tcp  --dport 8080 -j ACCEPT   I'm really confused.  I'll add this, in case it helps, but I don't know   netstat -pan | grep 80 tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN          16785/node       tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      16471/apache2   I can access my regular website running off of port 80 on apache, but the node.js server is inaccessible from outside. Accessing it from the server itself works fine.  So my question is: how would I go about debugging this? Could there be something else than iptables blocking some ports? How do I find out what it is?  Any help much appreciated!
114973
I recently got the Windows 10 anniversary update and installed bash. I tried installing nmap, but it wouldn't run.  My question: Is there any way for commands like nmap to correctly run in WSL?  Thanks in advance!  Error I get when running sudo nmap -sn 192.168.1.*: route_dst_netlink: cannot bind AF_NETLINK socket: Invalid argument  I remember reading somewhere that WSL doesn't have support for sockets, but can use TCP. Is this possible in this case? Also, will WSL ever have support for sockets?
95291
I want to run a ppp connection when my USB modem is connected, so I use this udev rule:  ACTION=="add", SUBSYSTEM=="tty", ATTRS{idVendor}=="16d8",\     RUN+="/usr/local/bin/newPPP.sh $env{DEVNAME}"  (My modem appears in /dev as ttyACM0)  newPPP.sh:  #!/bin/bash /usr/bin/pon prov $1 &gt;/dev/null 2&gt;&amp;1 &amp;   Problem:  The udev event fires, and newPPP.sh is running, but newPPP.sh process is killed after ~4-5s. ppp does not have time to connect (its timeout is 10s for dial up).  How can I run a long time process, that will not be killed?  I tried using nohup, but it didn't work either.  System: Arch Linux  Update  I found a solution , thanks to .  I use at now to run my job detached from udev process.  But the one question remains unanswered: Why do nohup and &amp; not work?
20536
I want to change the ssh port from 22 to 2800. I tried to change the /etc/ssh/ssh_config and removed the # from Port line and changed the number to 2800. after trigger the command: service ssh restart The connection continued. When I tried to connect from the port 2800, It refused. The Content of /etc/ssh/ssh_config is: Removed commented lines  Host * Port 2800     SendEnv LANG LC_*     HashKnownHosts yes     GSSAPIAuthentication yes     GSSAPIDelegateCredentials no   The command service ssh status gives the following output:  ● ssh.service - OpenBSD Secure Shell server    Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)    Active: active (running) since Fri 2017-09-22 20:31:45 IRST; 1s ago  Main PID: 1825 (sshd)     Tasks: 1    Memory: 724.0K       CPU: 5ms    CGroup: /system.slice/ssh.service            └─1825 /usr/sbin/sshd -D  Sep 22 20:31:45 GoodMind systemd[1]: Starting OpenBSD Secure Shell server... Sep 22 20:31:45 GoodMind sshd[1825]: Server listening on 0.0.0.0 port 22. Sep 22 20:31:45 GoodMind sshd[1825]: Server listening on :: port 22. Sep 22 20:31:45 GoodMind systemd[1]: Started OpenBSD Secure Shell server.   I tried other ports too. But still it has the same status. What do I do wrong?
50895
This is quite messed up, I know. Let me explain it all.  I have a dynamic DNS set on my router. I verified that, after port forwarding, I can connect to desired application (if I run something on port 1337 and forward the port to appropriate machine I can connect to it from outside with no issues).  Now, if I connect my Macbook to VPN and run something as described above, it works as expected. BUT, if I connect my machine running Ubuntu Server 16.04 to the VPN and run something or want to connect by ssh, it fails. I forwarded port I'm using for SSH connection on router. I also tried hosting a web server, which also failed.  What can I do about this issue? This doesn't make sense to me.  About Ubuntu Server machine: it's a clean install with openvpn client and ssh server configured, no firewall running, iptables not edited, connected to router via ethernet.  EDIT: Here are the routing tables: