{"id":10941,"date":"2025-01-17T09:18:41","date_gmt":"2025-01-17T09:18:41","guid":{"rendered":"https:\/\/www.trustedhosting.in\/blog\/?p=10941"},"modified":"2025-01-17T09:18:41","modified_gmt":"2025-01-17T09:18:41","slug":"how-to-restrict-ip-address-in-whmcs","status":"publish","type":"post","link":"https:\/\/www.webystrata.com\/blog\/how-to-restrict-ip-address-in-whmcs\/","title":{"rendered":"How to Restrict Access by IP Address in WHMCS"},"content":{"rendered":"<h1><a href=\"https:\/\/www.trustedhosting.in\/cpanel-hosting.html\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-10942 size-full\" title=\"How to Restrict Access by IP Address in WHMCS\" src=\"https:\/\/www.trustedhosting.in\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-scaled.jpg\" alt=\"How to Restrict Access by IP Address in WHMCS\" width=\"2560\" height=\"1707\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-scaled.jpg 2560w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-300x200.jpg 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-1024x683.jpg 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-768x512.jpg 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-1536x1024.jpg 1536w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2025\/01\/22111212_6536579-2048x1365.jpg 2048w\" sizes=\"auto, (max-width: 2560px) 100vw, 2560px\" \/><\/a><\/h1>\n<h1>How to Restrict Access by IP Address in WHMCS<\/h1>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_ab1b3f2c-22c6-4bb1-9cb4-486507b53321\" class=\"text-block-content\">\n<p>For increased protection, if your staff uses fixed IP addresses, you can restrict access to a specific set of IP addresses. This will help to prevent access by hackers and other malicious users.<\/p>\n<\/div>\n<\/div>\n<div class=\"step step-depth-1\" data-step-uuid=\"3eef8cec-a1de-415f-a7e5-f9d7c4bd6096\">\n<h2 id=\"restricting-access\" tabindex=\"0\">Restricting Access<\/h2>\n<div class=\"instructions screensteps-textblock\" tabindex=\"0\">\n<div id=\"text-content_827ca847-24df-4eeb-820f-d216afdadaf7\" class=\"text-block-content\">\n<p>To restrict access, create a\u00a0<code>.htaccess<\/code>\u00a0file in your WHMCS admin directory.<\/p>\n<p>Add the correct content for your version of Apache to the new\u00a0<code>.htaccess<\/code>\u00a0file:<\/p>\n<\/div>\n<\/div>\n<div class=\"step step-depth-2 child-step\" data-step-uuid=\"634301d1-cb22-498c-819f-20310c022270\">\n<h3 id=\"apache-2-2\" tabindex=\"0\">Apache 2.2<\/h3>\n<div class=\"code-block copy-clipboard--parent\">\n<pre id=\"code-content_7d7718aa-2b65-4d32-b325-9963890888a8\" tabindex=\"0\"><code>order deny,allow\r\nallow from 12.34.5.67\r\nallow from 98.76.54.32\r\ndeny from all<\/code><\/pre>\n<div class=\"copy-clipboard copy-clipboard--tt-right\"><\/div>\n<\/div>\n<\/div>\n<div class=\"step step-depth-2 child-step\" data-step-uuid=\"30470395-b91a-42f8-85e8-91c89465ebbc\">\n<h3 id=\"apache-2-4\" tabindex=\"0\">Apache 2.4<\/h3>\n<div class=\"code-block copy-clipboard--parent\">\n<pre id=\"code-content_8f998ca2-390f-4fc9-aac5-b588150384fe\" tabindex=\"0\"><code>Require ip 12.34.5.67\r\nRequire ip 98.76.54.32<\/code><\/pre>\n<\/div>\n<div class=\"instructions screensteps-textblock screensteps-wrapper--tip screensteps-wrapper\" tabindex=\"0\" role=\"status\" aria-label=\"tip\">\n<div id=\"text-content_d67f4fd3-3f3f-4ad8-8f6e-e880a6b30d96\" class=\"text-block-content\">\n<blockquote><p>You can specify as many different <code>allow from<\/code>\u00a0or\u00a0<code>Require ip<\/code>\u00a0lines as you require. You can allow entire IP subnets by specifying just the first part of an IP address (for example,\u00a0<code>12.34.<\/code>). This is\u00a0<code>.htaccess<\/code>\u00a0IP restriction.<\/p><\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Restrict Access by IP Address in WHMCS For increased protection, if your staff uses fixed IP addresses, you&hellip;<\/p>\n","protected":false},"author":1,"featured_media":10942,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whmcs"],"_links":{"self":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/comments?post=10941"}],"version-history":[{"count":1,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10941\/revisions"}],"predecessor-version":[{"id":10943,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/10941\/revisions\/10943"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media\/10942"}],"wp:attachment":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media?parent=10941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/categories?post=10941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/tags?post=10941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}