Unmetered Dedicated ServerDedicated Server SupportDedicated Server Live Help

How to Block an IP Address on a Linux server

 

To block an IP on your Linux server you need to use iptables tools  and netfilter firewall. First you need to log into shell as root user. To block an IP address you need to type the iptables command as follows:

# iptables -A INPUT -s IP-ADDRESS -j DROP

Replace IP-ADDRESS with your actual IP address. For example, if you wish to block an ip address 209.175.453.23 for whatever reason then type the command as follows:

# iptables -A INPUT -s 209.175.453.23 -j DROP

If you have IP tables firewall script, add the above rule to your script.If you just want to block access to one port from an ip 209.175.453.23 to port 22 then type command:

# iptables -A INPUT -s 209.175.453.23 -p tcp --destination-port 22 -j DROP


CentOS / RHEL / Fedora Block An IP And Save It To Config File

Type the following two command:

# iptables -A INPUT -s 209.175.453.23 -j DROP
# service iptables save

How to Unblock an IP Address on a LInux Server

 

Use the following syntax (the -d options deletes the rule from table):


# iptables -D INPUT -s
209.175.453.23 -j DROP
# service iptables save





Linux Dedicated Server

 

Dedicated Server Price Match Guarantee

 

What's Includes?

Servers Include :
  • No Setup Fees!!
  • No Bandwidth Overages!!
  • No Hidden Fees!!
  • Free Raid 0/1
  • Free IPMI Access or
  • Free KVM Access
  • Month-to-Month Billing
  • Cancel Anytime
  • 1U Servers
  • Rent to Own Option
24 x 7 x 365 Support Staff
24 x 7 x 365 Datacenter Staff
24 x 7 x 365 Network / Power Monitoring

 

Dedicated Server Hosting Dallas Texas

 

Network

BGP Routing

  • BGP Routing with multiple ISPs
  • AboveNet - Zayo
  • NTT Communications
  • Global Crossing
  • Limelight Networks
  • Cogent Communications
  • Level 3 Communications
  • Private Peering