Open ports

Rugbyears

New Member
Joined
Jun 18, 2022
Messages
17
Reaction score
10
Credits
171
As a complete novice I'm currently using the 'ss' command to manually look for open ports on my system. I feel its important to manually do this whilst I'm learning how Linux works. As my experience and knowledge with this platform improves I will create specific scripts to complete tasks, but for now I would like to fully understand what it is these commands are actually doing. Other than the 'ss' command and netstat, is there an alternative that I am missing that I should really learn? I apreciate this is a basic and obvious question, but we all have to start somewhere.
 


f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,900
Reaction score
3,526
Credits
35,667
Code:
man ss
man netstat
ss - another utility to investigate sockets
netstat - Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships
If you want to monitor something there monitoring tools such as Nagios that have plugins that allows you to monitor stuff you you can use nrpe to run scripts to monitor things there are no plugins for.
 
OP
Rugbyears

Rugbyears

New Member
Joined
Jun 18, 2022
Messages
17
Reaction score
10
Credits
171
Code:
man ss
man netstat

If you want to monitor something there monitoring tools such as Nagios that have plugins that allows you to monitor stuff you you can use nrpe to run scripts to monitor things there are no plugins for.
Thanks @f33dm3bits - I'm actually okay with 'ss' and netstat, although my terminology and explanations are way out - Sorry! I'm endeavoring to get in to the habit of refer to the man function to retrieve more information before posting questions on here - I'll be honest, I don't always understand it however!! Nevertheless, on this occasion what I am trying to do is understand how the commands actually works, what is it they are doing in the background to be able to interrogate and display the information - Are they just preforming a scan, how do they know if a port is open etc? I mean I understand what they do, just not how they do it.

Those additional suggestions are really appreciated and I will look at them in more depth once I understand whats actually happening in the background. :)
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,900
Reaction score
3,526
Credits
35,667
Basically with ss and netstat you can view anything having to do with connections to your system, sockets, what processes are running on what ports etc. Another useful one for troubleshooting is "tcpdump" you can use that to capture network traffic and to then view in in Wireshark.
 
OP
Rugbyears

Rugbyears

New Member
Joined
Jun 18, 2022
Messages
17
Reaction score
10
Credits
171
Basically with ss and netstat you can view anything having to do with connections to your system, sockets, what processes are running on what ports etc. Another useful one for troubleshooting is "tcpdump" you can use that to capture network traffic and to then view in in Wireshark.
That's really helpful and very much appreciate.
 

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
314
Credits
3,611
@Rugbyears may I recommend you obtain a copy of the Linux Bible? It's great for people who want to cover a lot of what Linux is, and is pretty easy to read. It includes a healthy networking chapter.
 
OP
Rugbyears

Rugbyears

New Member
Joined
Jun 18, 2022
Messages
17
Reaction score
10
Credits
171
@Rugbyears may I recommend you obtain a copy of the Linux Bible? It's great for people who want to cover a lot of what Linux is, and is pretty easy to read. It includes a healthy networking chapter.
Thanks @SlowCoder - Excellent call. I've just ordered a used copy from eBay. Am I correct in presuming that the one you are referring to is by Christopher Negus? There are plenty of PDF copies online, but I much prefer having the physical book in hand to read. This comes with age I'm afraid.:)
 

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
314
Credits
3,611
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online

No members online now.

Latest posts

Top