How to Whitelist/Allow an IP address on CentOS, Redhat, Fedora Linux Server

Steps to Allow incoming and outgoing connection in IPtables Firewall is given below.

 

How to Whitelist/Allow Incoming connection from an IP address

  1.   Login into your Linux server via SSH as ‘root’ user
  2. Run the command

iptables -A INPUT -s IPADDRESS -j ACCEPT

to whitelist/Allow the IP address

  1. Save the Iptables rule by running the command

service iptables save

  1. You must replace “IPADDRESS” in the Step 2 with the IP address you wish to whitelist.

 

How to Whitelist/Allow Outgoing connection to an IP address

  1.  Login to the Linux server via SSH as ‘root’ user
  2. Run the command

iptables -A OUTPUT -d IPADDRESS -j ACCEPT

to whitelist Outgoing connections

  1. Run the command

service iptables save

to save the IPtables rules.

At NexonHost, we believe that everyone deserves to have their services and applications be fast, secure, and always available.

Follow us

Quick Links

Newsletter

Be the first who gets our daily news and promotions directly on your email.

Copyright © 2025 . All Rights Reserved To NexonHost.