Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Create batch file that deny access to certain websites  (Read 8429 times)

0 Members and 1 Guest are viewing this topic.

khuynh

    Topic Starter


    Greenhorn

    Create batch file that deny access to certain websites
    « on: October 20, 2009, 10:53:44 AM »
    Hi everyone, I'm trying to create a batch file that stop the end user surfing some specific website such as adult website. I heard that we have to find the ip address of that website and copy it to the batch file with some commands but I don't know how to do that. I'm new to MS-DOS. If you have any good resources that can help, it would be great. I don't mind reading.
    Thanks!!!

    billrich

    • Guest

    Salmon Trout

    • Guest
    Re: Create batch file that deny access to certain websites
    « Reply #2 on: October 20, 2009, 01:40:05 PM »
    khuynh, you want to find out the ip addresses of adult websites? hmmm.....

    Seriously, it is easy to block access to a web url such as www.bikinbabes.com, less easy to block access to an ip address.

    It seems that Billrich thinks you want to find out your own ip address, but I am sure that when he gets around to actually reading your post properly he'll want to tell you to add the urls of the adult websites to your HOSTS file. If you search on Google for "Windows HOSTS file format" you will see lots of information about how to block access to a given web site this way.

    However since the HOSTS file can be manipulated by people such as hackers many system admins (and all sensible ones) deny access to ordinary users



    billrich

    • Guest
    Re: Create batch file that deny access to certain websites
    « Reply #3 on: October 20, 2009, 01:55:54 PM »
    khuynh, you want to find out the ip addresses of adult websites? hmmm.....

    Seriously, it is easy to block access to a web url such as www.bikinbabes.com, less easy to block access to an ip address.

    Add the urls of the adult websites to your HOSTS file. If you search on Google for "Windows HOSTS file format" you will see lots of information about how to block access to a given web site this way.

    However since the HOSTS file can be manipulated by people such as hackers many system admins (and all sensible ones) deny access to ordinary users


    Thank you Salmon Trout on how to block access to Porn sites.  If I understand your instructions:  We don't need the IP address of the porn site.
    URL ( the site address )  is what is blocked.

    A grandson or son  can easily reverse the Block.  The Porn sites are out  of control and a better screen is needed.

    Thanks again Salmon Trout for your professional advise.

    Salmon Trout

    • Guest
    Re: Create batch file that deny access to certain websites
    « Reply #4 on: October 20, 2009, 02:05:23 PM »
    So what is your suggestion? To block an ip address requires additional software such as a firewall.

    Quote from: The OP
    I'm trying to create a batch file that stop the end user surfing some specific website such as adult website.

    Add the url that you wish to block to HOSTS then make HOSTS readonly and hidden, finally deny admin provileges to the relevant users.

    BatchFileBasics



      Hopeful

      Thanked: 18
      Re: Create batch file that deny access to certain websites
      « Reply #5 on: October 20, 2009, 06:14:30 PM »
      i believe this wiki page has the right information of hosts and blocking sites, as well as other information of hosts
      When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

      khuynh

        Topic Starter


        Greenhorn

        Re: Create batch file that deny access to certain websites
        « Reply #6 on: October 21, 2009, 09:40:40 PM »
        Thanks everyone. I'll give it a shot... 8)

        khuynh

          Topic Starter


          Greenhorn

          Re: Create batch file that deny access to certain websites
          « Reply #7 on: October 22, 2009, 01:19:10 PM »
          Alright!!!! I did it. Thanks alot everyone. ;D

          billrich

          • Guest
          Re: Create batch file that deny access to certain websites
          « Reply #8 on: October 22, 2009, 01:34:30 PM »
          Thanks everyone. I'll give it a shot... 8)

          How did you block all Porn sites?  Can anyone remove your Block?


          http://www.netdogsoft.com