jchudoba
Děkuji, s přesným nastavením pomoci doufám nepotřebuji, jen potřebuji nakopnout, jak na to, děsně jsem se zamotal. Konfigurace:
# apr/27/2021 22:44:42 by RouterOS 6.48.1
# model = RouterBOARD 3011UiAS
/caps-man channel
add band=2ghz-g/n control-channel-width=20mhz name=2G reselect-interval=30m
add band=5ghz-a/n/ac control-channel-width=20mhz name=5G reselect-interval=\
30m skip-dfs-channels=yes
/caps-man datapath
add local-forwarding=yes name=lan
add local-forwarding=yes name=guest vlan-id=2 vlan-mode=use-tag
/interface bridge
add admin-mac=XX:XX:XX:XX:XX:XX arp=proxy-arp auto-mac=no name=br1_1Patro
add name=br2_2Patro
add name=br3_Sklep
/interface ethernet
set [ find default-name=ether1 ] name=eth1_WAN speed=100Mbps
set [ find default-name=ether2 ] name=eth2_LAN_1Patro speed=100Mbps
set [ find default-name=ether3 ] name=eth3_LAN_2Patro speed=100Mbps
set [ find default-name=ether4 ] name=eth4_LAN_Sklep speed=100Mbps
set [ find default-name=ether5 ] name=eth5_LAN_slave speed=100Mbps
set [ find default-name=ether6 ] name=eth6_LAN_slave speed=100Mbps
set [ find default-name=ether7 ] name=eth7_LAN_slave speed=100Mbps
set [ find default-name=ether8 ] name=eth8_LAN_slave speed=100Mbps
set [ find default-name=ether9 ] name=eth9_LAN_slave speed=100Mbps
set [ find default-name=ether10 ] name=eth10_LAN_AP speed=100Mbps
set [ find default-name=sfp1 ] advertise=\
10M-half,10M-full,100M-half,100M-full,1000M-half,1000M-full
/interface pppoe-client
add add-default-route=yes disabled=no interface=eth1_WAN name=pppoe-out1 \
use-peer-dns=yes user=VF
/interface vlan
add interface=br1_1Patro name=vlan2_GUEST vlan-id=2
add interface=br2_2Patro name=vlan_2Patro vlan-id=30
add interface=br3_Sklep name=vlan_Sklep vlan-id=40
/caps-man rates
add basic=12Mbps name=min_12mbps supported=\
12Mbps,18Mbps,24Mbps,36Mbps,48Mbps,54Mbps
/caps-man security
add authentication-types=wpa2-psk encryption=aes-ccm name=1Patro-guest
add authentication-types=wpa2-psk encryption=aes-ccm name=1Patro
/caps-man configuration
add channel=2G country="czech republic" datapath=lan disconnect-timeout=10s \
distance=indoors installation=indoor max-sta-count=20 mode=ap name=lan2G \
rates=min_12mbps security=1Patro ssid=1Patro
add channel=5G country="czech republic" datapath=lan disconnect-timeout=10s \
distance=indoors installation=indoor max-sta-count=20 mode=ap name=lan5G \
rates=min_12mbps security=1Patro ssid=1Patro
add datapath=guest mode=ap name=guest rates=min_12mbps security=1Patro-guest \
ssid="1Patro Guest"
/interface list
add name=wan
add name=lan
add name=discover
add name=macserver
add name=vpn
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip ipsec policy group
add name=l2tp
/ip ipsec profile
add enc-algorithm=aes-256,aes-192,aes-128 lifetime=8h name=l2tp
/ip ipsec peer
add name=l2tp passive=yes profile=l2tp send-initial-contact=no
/ip ipsec proposal
add name=l2tp pfs-group=modp2048
/ip pool
add name=dhcp ranges=192.168.123.101-192.168.123.199
add name=pool_GUEST ranges=192.168.124.101-192.168.124.199
add name=pool_2Patro ranges=192.168.130.100-192.168.130.199
add name=pool_Sklep ranges=192.168.140.100-192.168.140.199
/ip dhcp-server
add address-pool=dhcp disabled=no interface=br1_1Patro name=dhcp_LAN
add address-pool=pool_GUEST disabled=no interface=vlan2_GUEST name=dhcp_GUEST
add address-pool=pool_2Patro disabled=no interface=br2_2Patro name=\
dhcp_2Patro
add address-pool=pool_Sklep disabled=no interface=br3_Sklep name=dhcp_Sklep
/ppp profile
add address-list=vpn_ip interface-list=vpn local-address=192.168.123.1 name=\
vpn remote-address=dhcp use-encryption=required
/system logging action
add disk-file-count=20 disk-file-name=ipsec.log name=ipsec target=disk
/user group
set full policy="local,telnet,ssh,ftp,reboot,read,write,policy,test,winbox,pas\
sword,web,sniff,sensitive,api,romon,dude,tikapp"
/caps-man manager
set enabled=yes upgrade-policy=require-same-version
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=br1_1Patro
/caps-man provisioning
add action=create-dynamic-enabled hw-supported-modes=gn master-configuration=\
lan2G name-format=prefix-identity name-prefix=2G slave-configurations=\
guest
add action=create-dynamic-enabled hw-supported-modes=ac master-configuration=\
lan5G name-format=prefix-identity name-prefix=5G slave-configurations=\
guest
/interface bridge port
add bridge=br1_1Patro comment=defconf interface=eth2_LAN_1Patro
add bridge=br1_1Patro comment=defconf interface=eth5_LAN_slave
add bridge=br1_1Patro comment=defconf interface=eth6_LAN_slave
add bridge=br1_1Patro comment=defconf interface=eth7_LAN_slave
add bridge=br1_1Patro comment=defconf interface=eth8_LAN_slave
add bridge=br1_1Patro comment=defconf interface=eth9_LAN_slave
add bridge=br1_1Patro comment=defconf interface=eth10_LAN_AP
add bridge=br1_1Patro comment=defconf interface=sfp1
add bridge=br3_Sklep comment=defconf interface=eth4_LAN_Sklep
add bridge=br2_2Patro comment=defconf interface=eth3_LAN_2Patro
/ip neighbor discovery-settings
set discover-interface-list=discover
/interface l2tp-server server
set allow-fast-path=yes authentication=mschap2 default-profile=vpn enabled=\
yes keepalive-timeout=10
/interface list member
add interface=eth1_WAN list=wan
add interface=br1_1Patro list=discover
add interface=br1_1Patro list=macserver
add interface=pppoe-out1 list=lan
/interface pptp-server server
set authentication=mschap2 default-profile=vpn
/ip address
add address=192.168.123.1/24 interface=eth2_LAN_1Patro network=192.168.123.0
add address=192.168.124.1/24 interface=vlan2_GUEST network=192.168.124.0
/ip dhcp-client
add interface=eth1_WAN
/ip dhcp-server lease
add address=192.168.123.2 client-id=1:74:4d:28:86:b7:11 comment=AP \
mac-address=74:4D:28:86:B7:11 server=dhcp_LAN
add address=192.168.123.193 client-id=1:f0:92:1c:60:11:c comment=\
"HP Color Laser Jet CP5225" mac-address=F0:92:1C:60:11:0C server=dhcp_LAN
add address=192.168.123.167 client-id=1:0:bb:c1:76:27:7e comment=\
"Canon MF443dw" mac-address=00:BB:C1:76:27:7E server=dhcp_LAN
add address=192.168.123.5 client-id=1:cc:32:e5:29:c:6 comment=\
"tp-link T2600G-28TS (TL-SG3424)" mac-address=CC:32:E5:29:0C:06 server=\
dhcp_LAN
/ip dhcp-server network
add address=192.168.123.0/24 dns-server=192.168.123.1 gateway=192.168.123.1 \
ntp-server=192.168.123.1
add address=192.168.124.0/24 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.124.1
add address=192.168.130.0/24 gateway=192.168.130.1
add address=192.168.140.0/24 gateway=192.168.140.1
/ip dns
set allow-remote-requests=yes servers=10.0.1.2,10.0.1.6
/ip firewall address-list
add address=office.itprofik.cz list=wan_itp
add address=old-office.itprofik.cz list=wan_itp
/ip firewall filter
add action=accept chain=input comment="Povolit z ALL navazane a souvisejici" \
connection-state=established,related,untracked
add action=accept chain=input comment="Povolit z WAN vse z ITP" \
connection-state=new disabled=yes in-interface=eth1_WAN src-address-list=\
wan_itp
add action=accept chain=input comment="Povolit z ALL ipsec (ike, nat-t)" \
connection-state=new dst-port=500,4500 protocol=udp
add action=accept chain=input comment="Povolit z ALL-IPSEC l2tp vpn" \
connection-state=new dst-port=1701 protocol=udp
add action=accept chain=input comment="Povolit z LAN vse" connection-state=\
new in-interface=br1_1Patro src-address=192.168.123.0/24
add action=accept chain=input comment="Povolit z VPN vse" connection-state=\
new in-interface-list=vpn src-address=192.168.123.0/24 src-address-list=\
vpn_ip
add action=fasttrack-connection chain=forward comment=\
"Povolit ALL->ALL navazane a souvisejici - fasttrack" connection-state=\
established,related
add action=accept chain=forward comment=\
"Povolit ALL->ALL navazane a souvisejici" connection-state=\
established,related,untracked
add action=accept chain=forward comment="Povolit LAN->ALL nove" \
connection-state=new in-interface=br1_1Patro src-address=192.168.123.0/24
add action=accept chain=forward comment="Povolit VPN->ALL nove" \
connection-state=new in-interface-list=vpn src-address=192.168.123.0/24 \
src-address-list=vpn_ip
add action=accept chain=forward comment="Povolit GUEST->WAN nove" \
connection-state=new in-interface=vlan2_GUEST out-interface=pppoe-out1 \
src-address=192.168.124.0/24
add action=accept chain=forward comment="Povolit WAN->LAN pouze DNATovane" \
connection-nat-state=dstnat connection-state=new dst-address=\
192.168.123.0/24 in-interface=eth1_WAN out-interface=br1_1Patro
add action=accept chain=forward comment="Povolit GUEST->LAN pouze DNATovane" \
connection-nat-state=dstnat connection-state=new dst-address=\
192.168.123.0/24 in-interface=vlan2_GUEST out-interface=br1_1Patro \
src-address=192.168.124.0/24
add action=reject chain=forward comment="Zakazat ALL->ALL vse ostatni" \
reject-with=icmp-network-unreachable
add action=accept chain=input comment="Povolit z GUEST dhcp" \
connection-state=new dst-port=67 in-interface=vlan2_GUEST protocol=udp
add action=drop chain=input comment="Zakazat z ALL vse ostatni krome icmp" \
protocol=!icmp
/ip firewall nat
add action=masquerade chain=srcnat comment=\
"Vytvo\F8eno 1.10.2020 - zm\ECna internetu" out-interface=pppoe-out1
/ip ipsec identity
add generate-policy=port-strict peer=l2tp policy-template-group=l2tp
/ip ipsec policy
set 0 disabled=yes
add dst-address=0.0.0.0/0 group=l2tp proposal=l2tp protocol=udp src-address=\
10.201.3.19/32 template=yes
/ip route
add disabled=yes distance=1 gateway=10.201.3.17
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set api disabled=yes
set winbox address=192.168.123.0/24
set api-ssl disabled=yes
/lcd
set backlight-timeout=never default-screen=stats read-only-mode=yes \
touch-screen=disabled
/lcd interface
set eth2_LAN_1Patro disabled=yes
set eth3_LAN_2Patro disabled=yes
set eth4_LAN_Sklep disabled=yes
set eth5_LAN_slave disabled=yes
set sfp1 disabled=yes
set eth6_LAN_slave disabled=yes
set eth7_LAN_slave disabled=yes
set eth8_LAN_slave disabled=yes
set eth9_LAN_slave disabled=yes
set eth10_LAN_AP disabled=yes
/lcd interface pages
add interfaces=eth1_WAN
/lcd screen
set 1 disabled=yes
set 2 disabled=yes
set 3 disabled=yes
set 4 disabled=yes
set 5 disabled=yes
/system clock
set time-zone-name=Europe/Prague
/system identity
set name=GW-1Patro
/system logging
add action=ipsec disabled=yes topics=debug,ipsec,!packet
/system ntp client
set enabled=yes primary-ntp=195.113.144.201 secondary-ntp=195.113.144.238
/system ntp server
set enabled=yes
/system routerboard settings
set auto-upgrade=yes
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=macserver
/tool mac-server mac-winbox
set allowed-interface-list=macserver
nosek_tomas2004
Jestli to chápu dobře, pak jsem si původně také říkal, že by to takto mohlo jít, ale pak jsem znejistěl. Kontrolně se tedy radši zeptám, netuším totiž přesně, jak se s VLANy pracuje. Můžu si na každém portu udělat jednu/více VLANů, a s těmito pak pracovat jako s porty? Může tedy být VLAN v jiném Bridge než fyzický port?
EDIT:
jchudoba Jsou to patra, takže to tak hrozné nebude. Proto právě chci tři fyzické switche, aby to bylo easy.