Use HTACCESS File to limit access to IP only half working

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am trying to use my HTACCESS file to block all IP's but the ones I want to whitelist.



Below is my HTACCESS FILE:



<LIMIT GET>
order deny,allow
deny from all
# whitelist Boston IP
allow from 199.xx.xx.xx
# whitelist NY IP
allow from 199.xx.xx.xx
# whitelist SF IP
allow from 96.xx.xx.xx
</LIMIT>


To test I did not include the IP I would access the site from. When I do this I am still seeing data load from the site but there is no theme or styles associated with the data.



Question: How do I set it up so unless your IP is whitelisted you do not see the site at all?










share|improve this question





















  • Conclusion: the problem is not the LIMIT clause, but what you apply it to.
    – Satō Katsura
    Oct 10 '17 at 13:36










  • I am seeing my issue now. thanks for pointing that out.
    – Denoteone
    Oct 10 '17 at 13:45














up vote
0
down vote

favorite












I am trying to use my HTACCESS file to block all IP's but the ones I want to whitelist.



Below is my HTACCESS FILE:



<LIMIT GET>
order deny,allow
deny from all
# whitelist Boston IP
allow from 199.xx.xx.xx
# whitelist NY IP
allow from 199.xx.xx.xx
# whitelist SF IP
allow from 96.xx.xx.xx
</LIMIT>


To test I did not include the IP I would access the site from. When I do this I am still seeing data load from the site but there is no theme or styles associated with the data.



Question: How do I set it up so unless your IP is whitelisted you do not see the site at all?










share|improve this question





















  • Conclusion: the problem is not the LIMIT clause, but what you apply it to.
    – Satō Katsura
    Oct 10 '17 at 13:36










  • I am seeing my issue now. thanks for pointing that out.
    – Denoteone
    Oct 10 '17 at 13:45












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to use my HTACCESS file to block all IP's but the ones I want to whitelist.



Below is my HTACCESS FILE:



<LIMIT GET>
order deny,allow
deny from all
# whitelist Boston IP
allow from 199.xx.xx.xx
# whitelist NY IP
allow from 199.xx.xx.xx
# whitelist SF IP
allow from 96.xx.xx.xx
</LIMIT>


To test I did not include the IP I would access the site from. When I do this I am still seeing data load from the site but there is no theme or styles associated with the data.



Question: How do I set it up so unless your IP is whitelisted you do not see the site at all?










share|improve this question













I am trying to use my HTACCESS file to block all IP's but the ones I want to whitelist.



Below is my HTACCESS FILE:



<LIMIT GET>
order deny,allow
deny from all
# whitelist Boston IP
allow from 199.xx.xx.xx
# whitelist NY IP
allow from 199.xx.xx.xx
# whitelist SF IP
allow from 96.xx.xx.xx
</LIMIT>


To test I did not include the IP I would access the site from. When I do this I am still seeing data load from the site but there is no theme or styles associated with the data.



Question: How do I set it up so unless your IP is whitelisted you do not see the site at all?







apache-httpd ip htaccess






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 10 '17 at 13:26









Denoteone

1062




1062











  • Conclusion: the problem is not the LIMIT clause, but what you apply it to.
    – Satō Katsura
    Oct 10 '17 at 13:36










  • I am seeing my issue now. thanks for pointing that out.
    – Denoteone
    Oct 10 '17 at 13:45
















  • Conclusion: the problem is not the LIMIT clause, but what you apply it to.
    – Satō Katsura
    Oct 10 '17 at 13:36










  • I am seeing my issue now. thanks for pointing that out.
    – Denoteone
    Oct 10 '17 at 13:45















Conclusion: the problem is not the LIMIT clause, but what you apply it to.
– Satō Katsura
Oct 10 '17 at 13:36




Conclusion: the problem is not the LIMIT clause, but what you apply it to.
– Satō Katsura
Oct 10 '17 at 13:36












I am seeing my issue now. thanks for pointing that out.
– Denoteone
Oct 10 '17 at 13:45




I am seeing my issue now. thanks for pointing that out.
– Denoteone
Oct 10 '17 at 13:45










1 Answer
1






active

oldest

votes

















up vote
0
down vote













The Require Directive can be used when mod_authz_core is loaded:



 <Limit GET>
# whitelist Boston IP
Require ip 199.xx.xx.xx
# whitelist NY IP
Require ip 199.xx.xx.xx
# whitelist SF IP
Require ip 96.xx.xx.xx
</Limit>


Or just one line:



 <Limit GET>
# Boston NY SF
Require ip 199.xx.xx.xx 199.xx.xx.xx 96.xx.xx.xx
</Limit>





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397227%2fuse-htaccess-file-to-limit-access-to-ip-only-half-working%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    The Require Directive can be used when mod_authz_core is loaded:



     <Limit GET>
    # whitelist Boston IP
    Require ip 199.xx.xx.xx
    # whitelist NY IP
    Require ip 199.xx.xx.xx
    # whitelist SF IP
    Require ip 96.xx.xx.xx
    </Limit>


    Or just one line:



     <Limit GET>
    # Boston NY SF
    Require ip 199.xx.xx.xx 199.xx.xx.xx 96.xx.xx.xx
    </Limit>





    share|improve this answer
























      up vote
      0
      down vote













      The Require Directive can be used when mod_authz_core is loaded:



       <Limit GET>
      # whitelist Boston IP
      Require ip 199.xx.xx.xx
      # whitelist NY IP
      Require ip 199.xx.xx.xx
      # whitelist SF IP
      Require ip 96.xx.xx.xx
      </Limit>


      Or just one line:



       <Limit GET>
      # Boston NY SF
      Require ip 199.xx.xx.xx 199.xx.xx.xx 96.xx.xx.xx
      </Limit>





      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        The Require Directive can be used when mod_authz_core is loaded:



         <Limit GET>
        # whitelist Boston IP
        Require ip 199.xx.xx.xx
        # whitelist NY IP
        Require ip 199.xx.xx.xx
        # whitelist SF IP
        Require ip 96.xx.xx.xx
        </Limit>


        Or just one line:



         <Limit GET>
        # Boston NY SF
        Require ip 199.xx.xx.xx 199.xx.xx.xx 96.xx.xx.xx
        </Limit>





        share|improve this answer












        The Require Directive can be used when mod_authz_core is loaded:



         <Limit GET>
        # whitelist Boston IP
        Require ip 199.xx.xx.xx
        # whitelist NY IP
        Require ip 199.xx.xx.xx
        # whitelist SF IP
        Require ip 96.xx.xx.xx
        </Limit>


        Or just one line:



         <Limit GET>
        # Boston NY SF
        Require ip 199.xx.xx.xx 199.xx.xx.xx 96.xx.xx.xx
        </Limit>






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 10 '17 at 15:24









        hschou

        1,66349




        1,66349



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f397227%2fuse-htaccess-file-to-limit-access-to-ip-only-half-working%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay