Community discussions

MikroTik App
 
olikahn
just joined
Topic Author
Posts: 9
Joined: Thu Oct 02, 2008 10:43 pm

How can I Block the hostname?

Wed Nov 19, 2008 6:21 pm

hi
How can I Block the hostnames such as xxx.dyndns.org with dinamic IP on my Mikrotic routerboard?

I add new firewall Rules such as: chain=forward Src.Address=hostname Dst.Address=0.0.0.0/0 Action=Drop
But when i apply them , hostname in Src.Address changed with IP.
because their IP is not static i can block them only for many houres and when they update their host with new IP , They can connect me.

please kindly inform me how can i block the hostnames with Dinamic IP?
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26914
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia
Contact:

Re: How can I Block the hostname?

Thu Nov 20, 2008 10:24 am

you can only do this if you use webproxy, and add these in the access list with action block
 
olikahn
just joined
Topic Author
Posts: 9
Joined: Thu Oct 02, 2008 10:43 pm

Re: How can I Block the hostname?

Fri Nov 21, 2008 9:28 pm

hi
tanx for your answer but i could not block the hosts in web proxy.
i added rules with this parameters:
Src.Address = the host of someone who i want to block him such as xxx.dyndns.org
Dst.Address = 0.0.0.0/0
Dst.Host = the host of someone who i want to block him such as xxx.dyndns.org
Action = deny

but it didnot work.
and xxx.dyndns.org could connect me.

plz kindly explain more

regards
 
olikahn
just joined
Topic Author
Posts: 9
Joined: Thu Oct 02, 2008 10:43 pm

Re: How can I Block the hostname?

Wed Nov 26, 2008 5:16 am

is there any suggestion?
im waiting for your help.
 
anjey
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Mon Nov 24, 2008 12:11 pm

Re: How can I Block the hostname?

Wed Nov 26, 2008 12:35 pm

I resolved similar problem this way:
:foreach i in=[/ip firewall address-list find list="Blocked"] do={/ip firewall address-list remove $i}
 
/ip firewall address-list add address=[:resolve "somehost.com"] list="Blocked"
Schedule it once in 5-15 minute and create rule for that address-list
 
olikahn
just joined
Topic Author
Posts: 9
Joined: Thu Oct 02, 2008 10:43 pm

Re: How can I Block the hostname?

Sat Nov 29, 2008 1:00 am

hi sir

it seems very great but i can not understand perfectly :(

kindly explain more about rules with a example

for example i want block the host name such as "hostname.dyndns.com"
what must i do first and second and third ...

great regards
 
olikahn
just joined
Topic Author
Posts: 9
Joined: Thu Oct 02, 2008 10:43 pm

Re: How can I Block the hostname?

Tue Dec 02, 2008 11:42 am

hi mr anjey

im waitting for your help.

kindly explain more about rules with a example

for example i want block the host name such as "hostname.dyndns.com"
what must i do first and second and third ...

great regards
 
rwdotkom
just joined
Posts: 1
Joined: Mon Jun 22, 2015 8:48 pm

Re: How can I Block the hostname?

Mon Jun 22, 2015 10:03 pm

I resolved similar problem this way:
:foreach i in=[/ip firewall address-list find list="Blocked"] do={/ip firewall address-list remove $i}
 
/ip firewall address-list add address=[:resolve "somehost.com"] list="Blocked"
Schedule it once in 5-15 minute and create rule for that address-list
i had the same problems
i use RB750 on dhcp server leases found 2 hostname always changing mac add and getting new ip
Image

i tried anjey code but it always said "failure: dns name does not exist"
:foreach i in=[/ip firewall address-list find list="Blocked"] do={/ip firewall address-list remove $i}
 
/ip firewall address-list add address=[:resolve "android-565e71df87fc52c3"] list="Blocked"
/ip firewall address-list add address=[:resolve "android-77ea7bf356e363d9"] list="Blocked"

Who is online

Users browsing this forum: No registered users and 29 guests