Saturday, April 6, 2024
Htaccess

Cara Block IP Address Dengan Menggunakan htaccess

Jika anda mempunyai website dan ingin memblok IP Address tertentu agar IP Address tersebut tidak bisa mengakses website anda, bisanya jika anda terkena serangan hacking dari suatu ip, maka cara ini bisa di pasang . anda cukup membuat file dengan nama .htaccess yang di letakkan pada direktori utama website anda.
caranya adalah sebagai berikut :

  • Buat file dengan nama .htaccess dan isi file tersebut dengan salah satu script di bawah ini :

Untuk melakukan block pada satu IP Address :

order allow,deny
deny from 127.0.0.1
allow from all

  • Untuk melakukan block Multiple IP Address

order allow,deny
deny from 130.0.0.1
deny from 130.0.0.2
deny from 130.0.0.3
allow from all

atau

order allow,deny
deny from 192.168.11.12/21
deny from 112.0.0.2/22
deny from 122.0.0.3/30
allow from all

  • Untuk melakukan block pada range IP Address 192.0.0.0 sampai 192.0.0.255

deny from 192.0.0

  • Untuk melakukan block menurut hostname IP Address

deny from isp_name.com ( nama isp nya )

  • jika sudah di buat tinggal di upload di directory public_html anda
(Visited 73 times, 1 visits today)
Baca Juga :  Menghilangkan WWW URL melalui htaccess

Similar Posts


Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270