Community discussions

MikroTik App
 
rajesh
just joined
Topic Author
Posts: 1
Joined: Wed Jan 16, 2019 1:05 pm

Block/Allow website for specific IP

Wed Jan 16, 2019 2:08 pm

I want to Allow a domain example.com for specific IP (192.168.1.6) and
Block the same domain example.com for all other IPs 192.168.1.*
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Block/Allow website for specific IP

Wed Jan 16, 2019 5:09 pm

Not sure if this will work but create a firewall address list.

add control.domain.com list=AccessToDomain


Assuming you have two things
a. LAN to WAN filter rule for all traffic (forward chain)
b. Drop all else filter ruler for all traffic (forward chain)

/ip firewall filter
add chain=forward action=allow src-address=192.168.1.6/
dst-address-list=AccessToDomain
add chain=forward action=drop src-address=192.168.1.0/24
dst-address-list=AccessToDomain
add chain=forward action=allow in-interface=bridge(or LAN)
out-interface=WAN comment="Allow LAN to WAN traffic"
add chain=forward action=drop comment="Drop All Else"

Who is online

Users browsing this forum: baragoon, sokalsondha and 46 guests