Community discussions

MUM Europe 2020
 
philo
just joined
Topic Author
Posts: 1
Joined: Sat Nov 09, 2019 12:27 pm

block specific page on the site, but not whole site

Sat Nov 09, 2019 12:34 pm

Hi! i need help to block specific page.

I have made layer7-rule, mange and firewall with marking packets and dropping what is listed.
even if regexp find correct match, whole thingdoes not work.
however it works well, if i need to block site completely.

please advise how i can block page on the site.
thank you in advance
/ip firewall layer7-protocol
add name=bober regexp="^.+(kommersant\.ru\/finance).*$"

/ip firewall mangle
add action=mark-connection chain=prerouting connection-mark=no-mark layer7-protocol=bober new-connection-mark=bober_conn passthrough=yes 
add action=mark-packet chain=prerouting connection-mark=bober_conn new-packet-mark=bober_packet

/ip firewall filter
add action=drop chain=forward packet-mark=bober_packet
add action=drop chain=input packet-mark=bober_packet
 
pe1chl
Forum Guru
Forum Guru
Posts: 5974
Joined: Mon Jun 08, 2015 12:09 pm

Re: block specific page on the site, but not whole site

Sat Nov 09, 2019 2:10 pm

It is a HTTPS site. It is NOT possible to block a single page from such a site, only the entire site.
Other than that, it would not work this way in HTTP either. Remember the full URL http://domain.name/pagename is NOT visible in the requests made to the site.
So you cannot match on that. You would need to match on "GET /finance" or similar.

But again, it will not work for you because it is HTTPS like most websites today. Sorry, what you want to do is not possible.
 
zakynthoswifi
Frequent Visitor
Frequent Visitor
Posts: 74
Joined: Thu Jul 17, 2014 12:38 am
Location: Zakynthos
Contact:

Re: block specific page on the site, but not whole site

Sun Nov 10, 2019 10:11 am

maybe with proxy you can do that...
Ilias Theodosis
Network & Security Engineer
Cisco CCNA,CCNP,CCIE
Network Solutions Ltd.
Zakynthos, Greece
 
pe1chl
Forum Guru
Forum Guru
Posts: 5974
Joined: Mon Jun 08, 2015 12:09 pm

Re: block specific page on the site, but not whole site

Sun Nov 10, 2019 12:05 pm

no a proxy cannot do that either

Who is online

Users browsing this forum: No registered users and 31 guests