Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Need help blocking countries

Hi anyone know of a good way of blocking countries on Ubuntu 14 that doesn't cause to much server load. I know that Xtables and GeoIP works on KVM but so far I haven't found anything that works for OpenVZ.

Comments

  • you can use this page to create the file you need. You can use IPtables for Ubuntu 14.
    http://www.ip2location.com/blockvisitorsbycountry.aspx

    Thanked by 1solarman
  • With ip-table

    http://www.cyberciti.biz/faq/block-entier-country-using-iptables/

    Blocking ip addresses with htaccess with help from

    ****http://www.find-ip-address.org/ip-country/

    or with lighttpd.conf

    example:

    Do not allow IP address 192.168.1.5, 192.168.1.6 to access our site

    $HTTP["remoteip"] =~ " 212.7.0.0/24|192.155.242.40/29|1.2.2.0/24|187.1.96.0/24|187.111.112.0/24|181.188.128.0/24|181.114.192.0/24|179.50.128.0/24|179.42.96.0/24|165.254.168.0|111.88.80.0/22|91.228.128.0/22|46.151.200.0/21|91.223.158.0/24|91.225.204.0/22|94.48.96.0/21|94.48.192.0/21|85.122.32.0/21|162.244.0.0/16|104.254.0.0/16|107.189.1.163|115.28.171.47|151.75.0.0/16|165.254.0.0/16|172.245.0.0/16|176.10.104.234|176.31.0.0/16|173.245.0.0/16|109.230.0.0/16|202.189.0.0/16|92.96.0.0/16|72.253.0.0/16|176.34.0.0/16|202.131.0.0/16|173.237.0.0/16|178.209.0.0/16|92.27.0.0/16|119.46.0.0/16|41.132.0.0/16|69.163.0.0/16|46.51.0.0/16|176.28.0.0/16|88.80.0.0/16|213.244.0.0/16|64.196.0.0/16|182.177.0.0/16" {
    url.access-deny = ( "" )
    }

    also usefull link http://www.ip2location.com/blockvisitorsbycountry.aspx

    Thanked by 1solarman
  • simonindiasimonindia Member
    edited December 2015

    @solarman said:
    Hi anyone know of a good way of blocking countries on Ubuntu 14 that doesn't cause to much server load. I know that Xtables and GeoIP works on KVM but so far I haven't found anything that works for OpenVZ.

    Use Cloud flare and WAF IP Firewall in CF for blocking are challenging(captcha) the visitors from a country

    Thanked by 1solarman
Sign In or Register to comment.