Page 1 of 1
Block port
Posted: Fri Nov 12, 2010 8:06 am
by Rakou
Dear Sir,
Now i want to block my local intranet to some users.
those intranet use port: 81-84
IP address: 192.168.100.150 - 192.168.100.154
I have try to filter port and address but those group still can access.
ip firewall filter> add chain=forward src-address=10.10.10.30 protocol=tcp dst-port=81-84 action= drop
This rule is correct or not?
Please help to solve it!
Regard,
Re: Block port
Posted: Fri Nov 12, 2010 9:47 am
by mrz
If you want to block 192.168.100.150 - 192.168.100.154 then you have to set these addresses as src-address. In your rule src-address is 10.10.10.30
Re: Block port
Posted: Tue Nov 16, 2010 6:47 am
by Rakou
Ok, now i have another example and i hope you can explain me clearly:
Ex: I have username=rakou (this users is stay under Mikrotik)
IP: 10.10.10.30
Now i want to block this IP by do not allow access(Remote, Ping, IP Scan,... ) to
Range: 192.168.20.50-192.168.20.80 and this range add to address list
name=Intranet-Rang
As i add firwall filter now:
ip firewall filter> add chain=forward src-address-list=Intranet-Range dst-address=10.10.10.30 action= drop
So this rule is correct or not?
Rakou,
Re: Block port
Posted: Wed Nov 17, 2010 1:30 am
by andrescamino
Quote:
ip firewall filter> add chain=forward src-address-list=Intranet-Range dst-address=10.10.10.30 action= drop
So this rule is correct or not?
What that rule means is that every traffic starting at the address list Intranet-Range (192.168.20.50-192.168.20.80) intended to go to the ip 10.10.10.30 will drop...if that is you want to do...yes...the ip 10.10.10.30 won't have requirments from those ip's, and well everything also depends on your other filter rules, why don't you give us the filter rules you have so we can check it out and see if there is any more configuration.
Re: Block port
Posted: Wed Nov 17, 2010 3:39 am
by Rakou
Ok, sir. I have add two rule in the firewall filter:
1. Block IP: 10.10.10.30 can't access to local
Intranet-Range(192.168.100.150 - 192.168.100.154) use port 80-84
ip firewall filter> add chain=forward src-address=10.10.10.30 protocol=tcp dst-port=81-84 action= drop
But when i add this rule all clients under Mikrotik range(10.10.10.0/24) can't access to
Intranet-Range at all.
So why this rule affect to all clients?
2. Block IP: 10.10.10.50 can access to Local network(Ex: can access to Intranet-Range) but can't access to internet
IP firewall filter> add chain=forward src-address=10.10.10.50 dst-port=80 action= drop
So this rule can be accept or not?
I wish you can show me the really code to solve this problem because i really conflict with Mikrotik Firewall rule work and how to add second rule to work!
Regard,
Re: Block port
Posted: Thu Nov 18, 2010 6:51 pm
by andrescamino
Ok show me a diagram of your network and print the ip configuration in your router and also the firewall configuration...
I can take a look and see what's wrong, and make the modifications
Re: Block port
Posted: Thu Nov 18, 2010 8:24 pm
by mahnet
IP firewall filter> add chain=forward src-address=10.10.10.50 dst-port=80 action= drop
here it iz quite evident that u r dropping port 80 for IP 10.10.10.50 so how will the user access the web whr most sites use port 80
Re: Block port
Posted: Fri Oct 07, 2016 3:48 am
by Kastneraustin
One question how do I block ports 81 to 65536
Gateway is 192.168.2.1
Thanks
Re: Block port
Posted: Sat Oct 08, 2016 5:18 pm
by Kastneraustin
How do I block all ports except 80 & 443 on lan eth2
In winbox step by step configuration
Gateway ip is 192.168.2.1
Also pictures would be nice too to show me how to do it
Thanks
Re: Block port
Posted: Sat Oct 08, 2016 5:28 pm
by Kastneraustin
/ip firewall filter add chain=forward action=accept protocol=tcp dst-port=80
/ip firewall filter add chain=forward action=accept protocol=tcp dst-port=443
/ip firewall filter add chain=forward action=drop
Will this code work to block all ports but 80 & 443
And where do I put this code for it to work
Thanks
Re: Block port
Posted: Thu Jul 20, 2017 2:24 am
by Xtreme512
/ip firewall filter add chain=forward action=accept protocol=tcp dst-port=80
/ip firewall filter add chain=forward action=accept protocol=tcp dst-port=443
/ip firewall filter add chain=forward action=drop
Will this code work to block all ports but 80 & 443
And where do I put this code for it to work
Thanks
/ip firewall filter add chain=forward action=drop protocol=tcp dst-port=!80,443
block all tcp ports except 80,443