How do I install iptables under Redhat (RHEL) or CentOS or Fedora Linux operating systems?
In most Linux distros including Redhat / CentOS / Fedora Linux installs iptables by default. It has become a standard option in all distros. So there is a good chance that iptables is already installed in your server or workstation. But, you can use the following procedure to verify that iptables has been installed. Open a terminal Window or login using the ssh client to remote server. Make sure you logged in as root user. Type the following command:
# iptables
OR for IPv6 firewall, enter:
# ip6tables
Sample outputs:
ip6tables v1.3.5: no command specified Try `ip6tables -h' or 'ip6tables --help' for more information.
If iptables is installed, you should get the above message. You can use the following command to view the status of iptables command, enter:
# yum info iptables
Sample outputs:
Loaded plugins: downloadonly, rhnplugin, security
Installed Packages
Name : iptables
Arch : x86_64
Version : 1.3.5
Release : 5.3.el5_4.1
Size : 653 k
Repo : installed
Summary : Tools for managing Linux kernel packet filtering capabilities.
URL : http://www.netfilter.org/
License : GPL
Description: The iptables utility controls the network packet filtering code in the
: Linux kernel. If you need to set up firewalls and/or IP masquerading,
: you should install this package.
If the above message does not appear, then type the following command to install iptables, enter:
# yum install iptables
OR to install IPv6 firewall, enter:
# yum install ip6tables
How Do I Use iptables Command To Configure Firewall?
See our CentOS / Redhat Iptables Firewall Configuration tutorial for more information.
🐧 2 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Excellent tutorial, thanks for the helpful information! It is just what I need!
Without executing practically easily we can understood,Thanks to your website