Community discussions

MikroTik App
 
PreggieP
just joined
Topic Author
Posts: 13
Joined: Thu Feb 19, 2009 9:35 am

Blocking websites

Thu Feb 19, 2009 9:42 am

I've installed the web-proxy as per the example on the wiki, I would like to know if we could block websites from a text or spreadsheet file?

If this can be done, it would make my life much easier.

Kind Regards
Preggie Pillay
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 27073
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Blocking websites

Thu Feb 19, 2009 9:47 am

after you have added one or two block rules to your webproxy access list (and they are working), do the following:

1. command "/ip proxy access> export file=rules"
2. download that file to your PC and open with a text program

see how that file is made? all you need to do is add extra lines with other addresses. you can use a spreadsheet program to do this. the file can be imported with the "/import" command
 
PreggieP
just joined
Topic Author
Posts: 13
Joined: Thu Feb 19, 2009 9:35 am

Re: Blocking websites

Thu Feb 19, 2009 9:53 am

Thank you, not exactly what i had in mind, but it will work all the same.

Kind Regards
Preggie Pillay
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 27073
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Blocking websites

Thu Feb 19, 2009 9:58 am

if you can somehow automate the process of updating this file (like a Macro or something), then you can also make RouterOS auto-fetch the file and execute it with the "fetch" tool. It will download it from a webserver and run it.
 
PreggieP
just joined
Topic Author
Posts: 13
Joined: Thu Feb 19, 2009 9:35 am

Re: Blocking websites

Thu Feb 19, 2009 10:01 am

The "/import" command does not work, when i did a check it only lists export. I'm assuming i'm meant to do this at /ip proxy access

I'm Using v3.19

Kind Regards
Preggie Pillay
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 27073
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Blocking websites

Thu Feb 19, 2009 10:02 am

no, you should do "import" at root level
 
PreggieP
just joined
Topic Author
Posts: 13
Joined: Thu Feb 19, 2009 9:35 am

Re: Blocking websites

Thu Feb 19, 2009 10:16 am

I'm new at all this, how would you actual setup fetch rules

Kind Regards
Preggie Pillay
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 27073
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: Blocking websites

Thu Feb 19, 2009 10:23 am


[admin@I] /tool> fetch address=www.mikrotik.com path=index.php
host=forum.mikrotik.com
status: connecting
status: downloading
downloaded: 7KiB
duration: 1s

this is something to use also:
http://wiki.mikrotik.com/wiki/Using_Fet ... ress_Lists

also you will be able to use this feature:

*) automatically execute uploaded scripts that have name *.auto.rsc;