How do I whitelist an IP address in Linux?

How do I whitelist an IP address in Linux?

Here are the commands to whitelist an IP address on your Linux server, both incoming and outgoing.

  1. Example: How to whitelist IP address 192.168.0.1.
  2. Step 1: Log into the server via SSH.
  3. Step 2: Allow incoming connections from 192.168.0.1.
  4. Step 3: Allow outgoing connections to 192.168.0.1.
  5. Additional Options:

How do I allow a specific IP address in Linux?

Allow IP addresses

  1. Open the file /etc/hosts.allow file by using a text editor: vi /etc/hosts.allow.
  2. Add an sshd line to allow the IP address of your choice to connect by using public SSH. For example, the following line allows network 172.168.0.21 : sshd: 172.168.0.21.
  3. Save and close the file.

How do I whitelist an IP address in WordPress?

Most WordPress hosts use the popular Apache web server which means that you can whitelist IP addresses to all or part of your WordPress site using something called a . htaccess file.

  1. Connect to your site via FTP and look for it in the root folder.
  2. Use cPanel’s File Manager tool (if your host uses cPanel)

How to whitelist / allow an IP address on Linux server?

Step 1 : Login into your Linux server via SSH as ‘root’ user. Step 2: Run the command “iptables -A INPUT -s IPADDRESS -j ACCEPT” to whitelist/Allow the IP address. Step 3: Save the Iptables rule by running the command “service iptables save”. You must replace “IPADDRESS” in the Step 2 with the IP address you wish to whitelist.

How to whitelist IP address in MOD security?

Found the way. I use modsec version 3 and in my case there wasn’t a modsec configuration file in the location /etc/httpd/modsecurity.d/activated_rules/modsecurity_crs_10_whitelist.conf but there was one in: Thanks for contributing an answer to Information Security Stack Exchange! Please be sure to answer the question.

Where can I find white list of domain names?

I found white ist whole domain name in mod_security. But I want to white list only the administrator IP. OS: CentOS 6 Server: Apache httpd 2.15 Mod Security: Version 2.7 Found the way.

How to add a whitelist to a subnet?

You will have a range of open ports for the “whitelist” = subnet as requested. And of course use –permanent option in –add-xxx statements to make the behaviour stick. In turn any ports or services you have in “public” (default) zone will apply to all interfaces and source addresses.