Hello every one
In my network I have 3 vlan and microtik router RB951Ui
Vlan 10
Vlan 20
Vlan 50
How I can do this :
-Vlan 50 can access vlan 20 and vlan 10 with Internet
-Vlan 20 can access vlan 10 but cant access vlan 50 and internet
-Vlan 10 cant access vlan 20 , vlan 10 and internet
It depends on how is your router configured. Export the following configs and post them here in [__code] [/code] environment (execute commands in terminal window):
/interface export
/ip export
and anonymize public IP address(es) if they are displayed in the export.
No firewall filter rules means nothing is dropped. It also means connection tracking is disabled right now and adding a single firewall filter rule will enable connection tracking, which in turn means considerable routing performance drop. Be prepared for it.
So you actually need a few rules. Keep in mind that default (implicit) rule is to accept packets and for security sake it’s probably best to construct chain of rules which explicitly allows needed/wanted things and drop all the rest.
The first rule below handles most of packets, including reply packets of allowed connections (regardless the direction). The invalid packets are handled by second rule and the rest of packets are packets belonging to “new” connections and we have to deal with them according to requirements …
The network layout is not clear to me, so rules shown are just an example and you have to adjust them to your layout …
The rules above allow connections originating in VLAN 50 and terminating in VLANs 10 and 20, connections originating in VLAN 20 and terminating in VLAN 10. The rest are blocked by ultimate rule.
I’m not sure how pppoe-out interface 8M_ADSL_OUT fits in … it doesn’t seem to be proper internet access … you don’t have and NAT rule …
Another remark: rules are executed to-to-bottom, so place rules which will handle more packets higher the list which will lower load on RB.
Thank u very very very much
That is excatly what I need
So if I need to do the opposite choice
That I want to allow every packets but drop some , because in that scenario I should manaually add the packet that what I need to allow
But if I want to allow every packets and just drop some , Like just drop vlan 10 to access vlan 20 bit vlan 20 can access to vlan 10
What the filter rules should I do
In the end I am so grateful for your help
I’m in dilemma whether using the first rule would still be benefitial in case where you pass except what you don’t (meaning that likely there are less rules in total). Probably yes, so here are some rules:
The first rule deals with all packets belonging to already accepted connections, which include packets from VLAN 10 to VLAN 20 but are part of connections initiated from VLAN 20.
The second rule then blocks packets that are belonging to new connections and that are initiated in VLAN 10 targeting VLAN 20. If there wasn’t rule #1, then this (drop) rule would need connection-state=new included, without this part rule blocks packets which are part of established connections as well.
Note that I omited the “drop invalid” rule … as it seems you don’t care about security in particular. If you’d like to add just a bit of security, then you can add that rule (placement is not particularly important, not many packets will hit any of rules below the first one).
Mr.MKX
I hope just to check my config and tell me what is the matter
Because if the problem in my router I will replace it with Microtik 2011 router
thank u very much
What in particular doesn’t work according to your expectations?
IMHO one of reasons you have hard time to write correct firewall filter rules is that you describe wanted connectivity using VLANs and then you implement it partially considering VLANs and partly considering IP subnets. It is easier either to think of L2 network (interfaces and VLANs) or of L3 (IP) network, just try to not mix them both.
I’m sorry, but I don’t have time and energy to (mentally) visualize your physical and logical layout and think of all necessary firewall filter rules. So either draw a detailed plan with all IP subnets and interfaces and mark which connections are allowed and which not, then create needed rules. Or stick to what you have now and add a rule whenever you find some problem (either connection which passes but should not or connection which is blocked but should be allowed).
Mr mkx
thank you for your help
I solved all matter except one which
ip range 192.168.88.0/24 should access all vlan
but in real it can only access internet and vlan 70
One thing in your setup which is not quite right, is setup about 192.168.88.0/24. You have the address set on wlan1 interface, however that interface is bridge port. While ROS doesn’t seem to force correct setting, the correct setting is to bind L3 setup (IP address, services) to bridge interface and not to one of member ports.
This forum had seen some weird behaviour in similar conditions …