Hi
Has passed a long of time I had a lot of other work but in last week I get what I wanted and resolved my problem using marking packets and allow them in filter rules.
In firewall mangle I added:
/ip firewall mangle
add action=mark-packet chain=prerouting comment="Mark packets from vlan79 to 8\
1.120.12.176 network for accept them in filter." dst-address=\
81.120.12.176/29 new-packet-mark=valn79 passthrough=yes src-address=\
192.168.89.0/24
add action=mark-packet chain=prerouting comment="Mark packets from lan to 81.1\
20.12.176 network for accept them in filter." dst-address=\
81.120.12.176/29 new-packet-mark=lan passthrough=yes src-address=\
192.168.88.0/24
and in /ip firewall filter I added:
/ip firewall filter
add action=accept chain=forward comment=\
"Accept packet mark lan which connecting to public ips no locals." \
packet-mark=lan
add action=accept chain=forward comment=\
"Accept packet mark vlan79 which connecting to public ips no locals." \
packet-mark=valn79
So when some computer in local lan want connect to some my public ip then I marking this packet and allow them in firewall but when this computer want connect to host in toher lan then firewall deny them by
“DROP ALL other FORWARD traffic”
rule. I think this is a good method and what is important for me it works.
Thank you anav and sindy for yours sugestions. I hope I used them correctly and if I can ask you to check my configuration, in particular the order of rules in the firewall?
This is my export. I used other router and reset this router to default configuration for clearly configuration.
/interface bridge
add admin-mac=4C:5E:0C:6D:13:C7 auto-mac=no comment=defconf name=bridge
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-XX \
distance=indoors frequency=auto installation=indoor mode=ap-bridge ssid=\
MikroTik-6D13CB wireless-protocol=802.11
/interface vlan
add interface=ether3 name=vlan79 vlan-id=79
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=LAN79
add name=LANALL
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=default-dhcp ranges=192.168.88.10-192.168.88.254
add name=dhcp_pool1 ranges=192.168.89.2-192.168.89.254
/ip dhcp-server
add address-pool=default-dhcp disabled=no interface=bridge name=defconf
add address-pool=dhcp_pool1 disabled=no interface=vlan79 name=dhcp1
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf disabled=yes interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf interface=ether5
add bridge=bridge comment=defconf interface=wlan1
/ip neighbor discovery-settings
set discover-interface-list=LAN
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
add disabled=yes interface=vlan79 list=LAN
add interface=vlan79 list=LAN79
add interface=bridge list=LANALL
add interface=vlan79 list=LANALL
/ip address
add address=192.168.88.1/24 comment=defconf interface=bridge network=\
192.168.88.0
add address=81.120.12.178/29 interface=ether1 network=81.120.12.176
add address=192.168.89.1/24 interface=vlan79 network=192.168.89.0
add address=81.120.12.179/29 interface=ether1 network=81.120.12.176
/ip dhcp-server lease
add address=192.168.88.10 comment=Server1 mac-address=00:0C:29:2D:64:98 \
server=defconf
add address=192.168.88.12 comment=ADMIN mac-address=00:50:56:2E:81:A1 server=\
defconf
add address=192.168.89.15 client-id=1:0:e0:4c:20:b9:80 comment=Server2 \
mac-address=00:E0:4C:20:B9:80 server=dhcp1
/ip dhcp-server network
add address=192.168.88.0/24 comment=defconf gateway=192.168.88.1
add address=192.168.89.0/24 gateway=192.168.89.1
/ip dns
set allow-remote-requests=yes servers=81.120.12.177,8.8.8.8
/ip dns static
add address=192.168.88.1 comment=defconf name=router.lan
/ip firewall address-list
add address=192.168.88.12 list=ADMIN
add address=192.168.88.10 disabled=yes list=ADMIN
add address=192.168.89.15 disabled=yes list=ADMIN
/ip firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
add action=accept chain=input comment="Allow ADMIN to Router" in-interface=\
bridge src-address-list=ADMIN
add action=accept chain=input comment="Allow ADMIN to Router from VLAN79" \
disabled=yes in-interface=vlan79 src-address-list=ADMIN
add action=accept chain=input comment="Allow LAN DNS queries-TCP" \
connection-state=new dst-port=53 in-interface-list=LANALL protocol=tcp
add action=accept chain=input comment="Allow LAN DNS queries-UDP" \
connection-state=new dst-port=53 in-interface-list=LANALL protocol=udp
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
in-interface-list=!LANALL
add action=accept chain=input comment=\
"defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=accept chain=forward comment="defconf: accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="defconf: accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=fasttrack-connection chain=forward comment="defconf: fasttrack" \
connection-state=established,related
add action=accept chain=forward comment=\
"defconf: accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=accept chain=forward comment="ENABLE internet traffic LAN" \
in-interface-list=LAN out-interface-list=WAN
add action=accept chain=forward comment="ENABLE internet traffic VLAN79" \
in-interface-list=LAN79 out-interface-list=WAN
add action=accept chain=forward comment="ENABLE internet traffic" disabled=\
yes in-interface-list=LANALL out-interface-list=WAN
add action=accept chain=forward comment="ENABLE admin acces to VLAN79" \
in-interface=bridge out-interface=vlan79 src-address-list=ADMIN
add action=accept chain=forward comment="Allow Port Forwarding" \
connection-nat-state=dstnat connection-state=new in-interface-list=WAN
add action=accept chain=forward comment=\
"Accept packet mark lan which connecting to public ips no locals." \
packet-mark=lan
add action=accept chain=forward comment=\
"Accept packet mark vlan79 which connecting to public ips no locals." \
packet-mark=valn79
add action=drop chain=input comment="Drop anything else!"
add action=drop chain=forward comment="DROP ALL other FORWARD traffic"
/ip firewall mangle
add action=mark-packet chain=prerouting comment="Mark packets from vlan79 to 8\
1.120.12.176 network for accept them in filter." dst-address=\
81.120.12.176/29 new-packet-mark=valn79 passthrough=yes src-address=\
192.168.89.0/24
add action=mark-packet chain=prerouting comment="Mark packets from lan to 81.1\
20.12.176 network for accept them in filter." dst-address=\
81.120.12.176/29 new-packet-mark=lan passthrough=yes src-address=\
192.168.88.0/24
/ip firewall nat
add action=dst-nat chain=dstnat comment="Allow access to server1 port 80 WAN" \
dst-address=81.120.12.178 dst-port=80 protocol=tcp to-addresses=\
192.168.88.10
add action=dst-nat chain=dstnat comment=\
"Allow access to server2 port 80 from WAN" dst-address=81.120.12.179 \
dst-port=80 protocol=tcp to-addresses=192.168.89.15
add action=src-nat chain=srcnat comment=\
"Translate local ip 88.0 to public ip 178" dst-address=!192.168.88.1 \
src-address=192.168.88.0/24 to-addresses=81.120.12.178
add action=src-nat chain=srcnat comment=\
"Translate local ip 89.0 to public ip 179" dst-address=!192.168.89.1 \
src-address=192.168.89.0/24 to-addresses=81.120.12.179
add action=masquerade chain=srcnat comment="defconf: masquerade" disabled=yes \
in-interface=bridge ipsec-policy=out,none out-interface-list=WAN \
to-addresses=81.120.12.178
/ip route
add distance=1 gateway=81.120.12.177 pref-src=81.120.12.178
/system clock
set time-zone-name=Europe/Warsaw
/system identity
set name=MikroTikRsim
/system routerboard settings
set auto-upgrade=yes
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN
export.rsc (7.09 KB)