Networking

Connecting your computer to the Internet is one of the most important aspects of networking. Connecting to your printer, TV and your other computers is another valuable facet of networking.

Creating a Network Files System (NFS), which enables you to use the same file system on a variety of appliances, is another very valuable project.

You can use a commercial service like Dropbox or OneDrive. You can store your files on your own computers using ownCloud. Nextcloud is another self hosted productivity platform that keeps you in control of your data.

I like storing my files on a commercial server. Find a company that respects your privacy. Professionally designed and managed file sharing is a valuable service. Keeping your files backed up on a remote commercial server, helps insure that they are not lost in the same fire or flood your computers are lost in.

Git, GitHub and SSH are valuable tools that you should get familiar with. Git is a version control repository that you install on your own computer. It was originally created by Linus Torvalds, the original developer of the Linux kernel. GitHub is a remote file repository, which allows many programmers to login and work on a project. SSH is the secure communications channel you use to connect to GitHub, Bitbucket or any of the other version control repositories.

It seems like there are several programs, like KDE Connect, working on connecting to your smart phone to your computer. Joplin is a pretty good note taking app for your phone. Orgzly is a smart phone app that enables you to connect with the Emacs application on your computer.

Sockets and Ports

In computer networking, a socket is an end point of two-way communications, which occurs in a network based on the internet protocol. Sockets will distribute data packets coming through the communication channel to the correct application. It does this using information in the header of the message, such as IP address and port number. Your operating system maps each socket to a process or thread.

There are two types of sockets, called active sockets and passive sockets. An active socket is a socket connected to another active socket, through an open data connection. Active sockets at both ends of the communication channel will be destroyed when the connection is closed.

A passive socket is waiting for an incoming connection. When a passive socket is connected, it will generate a new active socket. An internet socket is identified by the address of the local socket (local IP address and port number), the address of the remote socket and the transport protocol (e.g. TCP, UDP).

Sockets are end points of two-way communications. Ports are logical data connections, which are used to exchange data without using a temporary file or storage. Sockets are associated with a port and there can be multiple active sockets associated with a port. There can also be a single passive socket associated with a port, listening for incoming connections.

Systemd creates and manages the sockets used for communication between system components. For instance, it first creates the socket /dev/log and then starts the syslog daemon. This approach has two advantages: Processes communicating with syslog via /dev/log can be started in parallel. And crashed services can be restarted without losing their connection to processes that communicate with them via sockets. The kernel will buffer the communication while the process restarts.

Ports are network locations implemented in an operating system. They are 16 bit numbers that can be addressed to different services or applications. Ports are identified using port numbers, the IP address associated with the port and the transportation protocol, such as TCP or UDP.

Ports are always associated with the IP address of a host and the protocol type of the communication. TCP and UDP ports are used to exchange data between computers on the Internet. They are the most widely used ports.

​Ports are specified by a number from 1 to 65535. There are different categories of ports and certain port numbers are reserved for specific types of services.

1. 0-1023 – System ports are associated with critical or essential services.

2. 1024-49151 – Registered Ports or User Ports can be reserved by sending a request to the Internet Assigned Numbers Authority (IANA).

3. 49152-65535 – Dynamic Ports or Private Ports are for private use.

Get your system configured to manage your ports by installing nmap and net-tools. These tools (ss, lsof, netstat and nmap,) enable you to manage your network using the command line in your terminal. They can reveal a lot about the status of the services running on your machine.

Services listen on ports by binding to a port/protocol/IP address combination, to wait for requests from clients of the service. When a request is received, the service establishes a one-to-one server client dialog, using the port number.

Open ports can be used to infiltrate your network, so paying attention to which ports on your network are listening is important. Unauthorized open ports can indicate an intrusion.

Understanding Linux ports, and the information being sent in and out of your system through the ports, helps you prevent harmful intrusions. Knowledge about ports is essential for Linux enthusiasts and system administrators. Browse their man pages for more information.

Drivers

Drivers are the software that enables your computer to connect with and communicate with your other hardware. You’ll probably have to install a driver for your printer, for example.

Getting your Linux computer to connect with your TV is another complicated project.