Community discussions

MikroTik App
 
meazz1
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Tue Nov 28, 2017 9:44 pm
Location: Auburn, GA

HexS - does thiis configuration looks ok

Sat Jun 12, 2021 10:23 pm

My only goal is to have a LAN and and IoT Vlan, it just seems so difficult.
Here's my config, I just need to see if the firewall is still somewhat in default state to give me out of the box protection. Secondly, the Vlan20 does not have access to Lan devices.
# jun/12/2021 15:15:29 by RouterOS 6.48.3
# software id = 5MZ7-RL5B
#
# model = RB760iGS
# serial number = E1F30D1CB7FB
/interface bridge
add admin-mac=08:55:31:CD:0D:6A auto-mac=no comment=defconf name=bridge
/interface vlan
add comment=Iot-vlan interface=ether5 name=VLAN20 vlan-id=20
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.4.20-192.168.88.200
add comment="DHCP pool for iot-vlan" name=dhcp_pool2 ranges=\
    10.0.20.2-10.0.20.200
/ip dhcp-server
add address-pool=dhcp disabled=no interface=bridge name=defconf
add address-pool=dhcp_pool2 disabled=no interface=VLAN20 name=dhcp1
/interface bridge port
add bridge=bridge comment=defconf interface=ether2
add bridge=bridge comment=defconf interface=ether3
add bridge=bridge comment=defconf interface=ether4
add bridge=bridge comment=defconf ingress-filtering=yes interface=ether5 \
    pvid=20
add bridge=bridge comment=defconf interface=sfp1
/ip neighbor discovery-settings
set discover-interface-list=none
/interface list member
add comment=defconf interface=bridge list=LAN
add comment=defconf interface=ether1 list=WAN
/ip address
add address=192.168.4.1/24 comment=defconf interface=bridge network=\
    192.168.4.0
add address=10.0.20.1/24 interface=VLAN20 network=10.0.20.0
/ip dhcp-client
add comment=defconf disabled=no interface=ether1
/ip dhcp-server network
add address=10.0.20.0/24 comment=VLAN20-untrusted dns-server=8.8.8.8,1.1.1.1 \
    gateway=10.0.20.1
add address=192.168.4.0/24 comment=defconf dns-server=\
    192.168.4.209,192.168.4.208 domain=clubamgg.com gateway=192.168.4.1 \
    netmask=24
/ip dns static
add address=192.168.4.1 comment=defconf name=router.lan
/ip firewall address-list
add address=192.168.4.0/24 list=trusted
add address=10.0.20.0/24 list=untrusted
/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=\
    "defconf: accept to local loopback (for CAPsMAN)" dst-address=127.0.0.1
add action=drop chain=input comment="defconf: drop all not coming from LAN" \
    in-interface-list=!LAN
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=drop chain=forward comment=\
    "defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
    connection-state=new in-interface-list=WAN
add action=accept chain=forward dst-address-list=untrusted src-address-list=\
    trusted
add action=drop chain=forward dst-address-list=trusted src-address-list=\
    untrusted
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
    ipsec-policy=out,none out-interface-list=WAN
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh port=2200
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=America/New_York
/system identity
set name=router
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=none
/tool mac-server mac-winbox
set allowed-interface-list=none
/tool mac-server ping
set enabled=no
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18959
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: HexS - does thiis configuration looks ok

Sat Jun 12, 2021 10:45 pm

(1) ERROR
/ip pool
add name=dhcp ranges=192.168.4.20-192.168.88.200

(2) to access winbox set this to safe subnet.........
/tool mac-server mac-winbox
set allowed-interface-list=MNGMT

Where
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
add name=MNGMT

/interface list member
add comment=defconf interface=ether1 list=WAN
add comment=defconf interface=bridge list=LAN
add interface=vlan20 list=LAN
add interface=bridge list=MNGMT


(3) This can be set to MNGMT
/ip neighbor discovery-settings
set discover-interface-list=MNGMT

(4) Dont forget you need to enable the checkbox for vlan filtering on the bridge.
 
meazz1
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Tue Nov 28, 2017 9:44 pm
Location: Auburn, GA

Re: HexS - does thiis configuration looks ok

Sun Jun 13, 2021 12:08 am

@anav
Thank you.
I took care of the first 3 as you suggested.
For #4, I checked the VLAN Filtering, for the Frame Types "admit all"? Which one from the drop down to pick?

The port#5 in the router is carrying both Vlan20 and lan traffic to Unifi switch, which seems to be working already.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18959
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: HexS - does thiis configuration looks ok

Sun Jun 13, 2021 3:39 am

the one I am talking about is located when you double click (left) on the bridge itself.
Brings up a popup menu look under VLAN, and the box next to VLAN filtering.
 
meazz1
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Tue Nov 28, 2017 9:44 pm
Location: Auburn, GA

Re: HexS - does thiis configuration looks ok

Sun Jun 13, 2021 8:51 pm

Is this what you mean?


Image
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18959
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: HexS - does thiis configuration looks ok  [SOLVED]

Sun Jun 13, 2021 11:12 pm

Yup............ lucky find LOL
Although you dont really need a vlan for bridge vlan filtering if you ONLY HAVE ONE VLAN on one port.
Vlans come into play when you have more than one subnet required on a single port.

Who is online

Users browsing this forum: rplant and 60 guests