Skip to content

Commit 2f90df4

Browse files
authored
Merge pull request snori74#114 from EagTG/patch-1
Update 09.md
2 parents 508013b + 2ba79de commit 2f90df4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

09.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ There are a wide range of options that can be used with *ss*, but first try: *ss
1717

1818
The output lines show which ports are open on which interfaces:
1919

20-
ss -ltp
21-
State Recv-Q Send-Q Local Address:Port Peer Address:Port
22-
LISTEN 0 128 127.0.0.53%lo:53 0.0.0.0:*
23-
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
24-
LISTEN 0 128 *:80 *:*
25-
LISTEN 0 128 [::]:22 [::]:*
26-
20+
sudo ss -ltp
21+
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
22+
LISTEN 0 4096 127.0.0.53%lo:domain 0.0.0.0:* users:(("systemd-resolve",pid=364,fd=13))
23+
LISTEN 0 128 0.0.0.0:ssh 0.0.0.0:* users:(("sshd",pid=625,fd=3))
24+
LISTEN 0 128 [::]:ssh [::]:* users:(("sshd",pid=625,fd=4))
25+
LISTEN 0 511 *:http *:* users:(("apache2",pid=106630,fd=4),("apache2",pid=106629,fd=4),("apache2",pid=106627,fd=4))
26+
2727
The network notation can be a little confusing, but the lines above show ports 80 and 22 open "to the world" on all local IP addresses - and port 53 (DNS) open only on a special local address.
2828

2929
Now install `nmap` with `apt install`. This works rather differently, actively probing 1,000 or more ports to check whether they're open. It's most famously used to scan remote machines - please don't - but it's also very handy to check your own configuration, by scanning your server:

0 commit comments

Comments
 (0)