UNIX Unit-4 Part 2-Networking Tools
UNIX Unit-4 Part 2-Networking Tools
• Firewall
• Telnet
• FTP
• Ping Command
FIREWALLS
However, firewalls are not enough on their own. They can’t stop all
types of attacks, especially if someone opens a harmful file or email.
That’s why it’s important to use firewalls along with other security
tools like antivirus and regular updates.
TYPES OF FIREWALLS
There are two main types of firewalls used in UNIX systems: host-
based firewalls and network-based firewalls.
USES OF FIREWALLS
WORKING OF FIREWALL
A firewall in Linux controls the network traffic coming into and going
out of your computer. It uses rules that say what kind of traffic should
be allowed or blocked. You can create and manage these rules using
commands like iptables or nftables.
sudo iptables -L
This lists all the current rules that tell the firewall what traffic to allow
or block.
For example, if you want to allow web traffic (which uses port 80), you
can add a rule like:
This command means: “Add a rule (-A) to the incoming traffic chain
(INPUT) to accept (-j ACCEPT) any TCP packets (-p tcp) coming to
port 80 (--dport 80).”
3. Block unwanted traffic:
If you want to block traffic from a specific IP address, you can use:
This tells the firewall to drop (ignore) all incoming packets from the IP
address 192.168.1.100.
Rules you add are temporary and will be lost after reboot unless
saved. To save the current rules, you might use:
USES OF TELNET
In Linux, the Telnet command permits users to link with other servers
through the web on Telnet port 23, which is also common for network
connectivity tests, port checking, and remote admin. Below are
some common Telnet commands showcasing the ease of use.
Syntax:
telnet 192.168.1.1
This command will attempt to access the device at the specified IP
address connection with a remote system using Telnet
Example 2: Checking an Open Port
telnet example.com 80
If the connection is successful, the Telnet command Linux confirms
the port is open. Otherwise, it indicates that the port is closed or
blocked by a firewall.
telnet user@remote-host
• Enter the username and password when prompted.
• If login is successful, you can execute commands remotely.
USES OF FTP
4. Backing Up Data:
Below are the basic commands to start, stop, and check the status
of the FTP server:
This command is used to stop the FTP server. You may want to do this
if you’re performing maintenance, updating settings, or fixing a
security issue. Once the server is stopped, users will not be able to
connect or transfer files. This helps protect the server while changes
are being made or when FTP is not needed.
PING COMMAND
To check your internet connection using the ping command, open the
terminal and type the following command:
ping www.google.com