logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

Konfiguracja VLAN-ów na Mikrotik - dostęp do konkretnych usług pomiędzy nimi

wachcio 29 Lip 2024 20:43 1821 27
REKLAMA
  • #1 21173116
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Witam
    Wdrażam u siebie w sieci domowej VLAN-y na urządzeniach Mikrotik. Na razie nie włączyłem "VLAN filtering" gdyż nie jestem pewien jak najlepiej rozwiązać następujące problemy:
    -dostęp z różnych VLAN-ów do 2 serwerów DNS (AdGuard Home) postawionych jako kontenery dockerowe na Raspberry Pi i jednego jako LXC na Proxmox
    -możliwość sterowani sterownikiem w kotłowni opartym na ESP32 (Tasmota) w VLAN-ie IoT z NodeRed na kontenerze Kubernetes w TrueNAS w innym VLAN-ie
    -innych podobnych problemach
    Muszę dodać odpowiednie reguły na firewall-u Mikrotik czy jakoś inaczej powinienem to załatwić?
  • REKLAMA
  • #2 21173150
    Konto nie istnieje
    Poziom 1  
  • REKLAMA
  • #3 21173176
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Erbit napisał:
    wachcio napisał:
    Muszę dodać odpowiednie reguły na firewall-u Mikrotik


    Dokładnie tak ale nie muszą to być reguły na całe klasy adresowe, mogą to być reguły dla pojedynczego hosta.

    Zainteresuj się listami adresowymi - to ciekawy pomysł na realizację tego co chcesz zrobić. Tworzysz regułę pozwalającą na ruch z jednej listy adresowej na drugą (forward) a potem do tych list dodajesz odpowiednie adresy IP.

    Rozumiem, że coś takiego?
    /ip firewall address-list
    add address=192.168.2.70-192.168.2.72 list=Local_DNS
    /ip firewall filter
    add action=accept chain=forward comment="AdGuard Home DNS VLAN-y" dst-address-list=Local_DNS dst-port=53 in-interface=all-vlan protocol=udp src-port=53
    add action=accept chain=forward comment="AdGuard Home DNS VLAN-y" dst-address-list=Local_DNS dst-port=853 in-interface=all-vlan protocol=udp src-port=853


    Rozumiem, że jeśli urządzenia z kontenerami są podpięte bezpośrednio do switcha to tylko na nim wystarczy ustawić te reguły. Nie muszę dawać ich również na AP-kach i głównym routerze gdzie rozgłaszane są wifi?
  • REKLAMA
  • #4 21173806
    Konto nie istnieje
    Poziom 1  
  • #5 21173838
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Moja sieć jest w topologii gwiazdy. Główny switch to Mikrotik CRS326, router główny to MT AX3 (na nim CAPsMAN) , dodatkowe AP to AX3 i AX2.
    Właśnie zdziwiło mnie, na firewallu w switchu nic nie mogę zablokować.
  • #6 21173850
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    wachcio napisał:
    Właśnie zdziwiło mnie, na firewallu w switchu nic nie mogę zablokować.

    Najprawdopodobniej - dlatego, ze należałoby switcha zbootować z RouterOS'a a nie SW-OS'a ...

    Jak podaje dokumentacja :

    Mikrotik napisał:

    SwOS/RouterOS powered 24 port Gigabit Ethernet switch with two SFP+ ports, wire speed connectivity with several new switching features!

    It has “Dual boot” feature that allows you to choose which operating system you prefer to use, RouterOS or SwOS. If you prefer to have a simplified switch only OS with more switch specific features, use SwOS. If you are used to Winbox and would like the ability to use routing and other Layer 3 features on some ports in your CRS, boot and use RouterOS. You can select the desired operating system from RouterOS, from SwOS or from the RouterBOOT loader settings.

    [...]

    ( https://mikrotik.com/product/CRS326-24G-2SplusRM )
  • #7 21173916
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    >>21173850
    Działa na RouterOS
  • #8 21173937
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    No, to ciekawe ...
    A co konkretnie chciał Kolega blokować (jaki typ ruchu - skąd -dokąd ) ?

    W rozumieniu: czy Kolega sprawdził - czy ten ruch między VLAN-ami przechodzi przez router,
    czy tylko i wyłącznie switch realizuje routing przez swoją funkcjonalność L3 ... ?

    Pojęcie: Inter VLAN routing.

    UPD: tutaj artykuł - który może wnieść więcej światła do tej tematyki :
    https://networkers.pl/pl/inter-vlan-routing
  • #9 21174115
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    markooff napisał:
    No, to ciekawe ...
    A co konkretnie chciał Kolega blokować (jaki typ ruchu - skąd -dokąd ) ?

    W rozumieniu: czy Kolega sprawdził - czy ten ruch między VLAN-ami przechodzi przez router,
    czy tylko i wyłącznie switch realizuje routing przez swoją funkcjonalność L3 ... ?

    Pojęcie: Inter VLAN routing.

    UPD: tutaj artykuł - który może wnieść więcej światła do tej tematyki :
    https://networkers.pl/pl/inter-vlan-routing


    Włączyłem "VLAN filtering" i pomimo reguły podanej powyżej w innych VLAN-ach niż są serwery DNS odcięło net. Dlatego wyłączyłęm tę opcję znów i szukałem przyczyny tym razem zmieniając regułę na blokującą i wstawiałem ją na różne urządzenia czekając kiedy odetnie znów net.
  • #10 21174124
    Konto nie istnieje
    Poziom 1  
  • #11 21174164
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    >>21174115
    wachcio napisał:
    Włączyłem "VLAN filtering" i pomimo reguły podanej powyżej w innych VLAN-ach niż są serwery DNS odcięło net. Dlatego wyłączyłęm tę opcję znów i szukałem przyczyny tym razem zmieniając regułę na blokującą i wstawiałem ją na różne urządzenia czekając kiedy odetnie znów net.

    Nie znam składni mikrotikowego CLI - aż tak na pamięć - i nie wiem co u niego oznacza VLAN-filtering ( czy to jest rodzaj połaczenia trunkowego w trybie "[...] except vlan [VLAN-IDs]" ?? ) czy to realizuje taki scenariusz ... ?
    Bo to byłoby nawet jakoś logiczne - ale pozostaje i tak problem przekazywania pakietów pomiędzy segmentami sieci, którymi są z natury VLANy (802.1q) .

    Najlepiej będzie jak wrzuci Kolega tu - plik ze zrzutem konfiguracji - jak to podał powyżej kol. @Erbit :)
  • #12 21174171
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    AP na ogród
    # 2024-07-30 16:54:36 by RouterOS 7.15.2
    # software id = WHDA-K050
    #
    # model = C52iG-5HaxD2HaxD
    # serial number = xxxxxxxxxxxxx
    /interface bridge
    add admin-mac=48:A9:8A:F4:19:D1 auto-mac=no comment=defconf name=bridge
    /interface ethernet
    set [ find default-name=ether3 ] name=ether3_LAN
    /interface wifi
    # managed by CAPsMAN
    # mode: AP, SSID: wachcio_2.4, channel: 2412/ax/Ce
    set [ find default-name=wifi2 ] configuration.manager=capsman .mode=ap \
        disabled=no mtu=1500 name=wifi2_4ghz security.authentication-types=\
        wpa2-psk,wpa3-psk .ft=yes .ft-over-ds=yes
    # managed by CAPsMAN
    # mode: AP, SSID: wachcio_5GHz, channel: 5745/ax/Ceee
    set [ find default-name=wifi1 ] channel.skip-dfs-channels=10min-cac \
        configuration.manager=capsman .mode=ap disabled=no name=wifi5ghz \
        security.authentication-types="" .ft=yes .ft-over-ds=yes
    /interface vlan
    add interface=bridge name=vlan10_IoT vlan-id=10
    add interface=bridge name=vlan20_gosc vlan-id=20
    add disabled=yes interface=bridge name=vlan100_mgmt vlan-id=100
    /interface list
    add comment=defconf name=WAN
    add comment=defconf name=LAN
    /interface wifi datapath
    add bridge=bridge disabled=no name=datapath1
    /ip pool
    add name=default-dhcp ranges=192.168.88.10-192.168.88.254
    /system logging action
    add name=syslogNG remote=192.168.2.71 target=remote
    /disk settings
    set auto-media-interface=bridge auto-media-sharing=yes auto-smb-sharing=yes
    /interface bridge port
    add bridge=bridge comment=defconf interface=ether2
    add bridge=bridge comment=defconf interface=ether3_LAN
    add bridge=bridge comment=defconf interface=ether4
    add bridge=bridge comment=defconf interface=wifi5ghz
    add bridge=bridge comment=defconf interface=wifi2_4ghz
    add bridge=bridge interface=ether5
    /ip firewall connection tracking
    set udp-timeout=10s
    /ip neighbor discovery-settings
    set discover-interface-list=LAN
    /interface bridge vlan
    add bridge=bridge disabled=yes tagged=ether3_LAN vlan-ids=100
    add bridge=bridge tagged=ether3_LAN vlan-ids=10
    add bridge=bridge tagged=ether3_LAN vlan-ids=20
    /interface list member
    add comment=defconf interface=bridge list=LAN
    add comment=defconf interface=ether1 list=WAN
    /interface wifi cap
    set caps-man-addresses=192.168.2.1 discovery-interfaces=bridge enabled=yes \
        slaves-datapath=datapath1
    /ip address
    add address=192.168.10.4/24 interface=vlan10_IoT network=192.168.10.0
    add address=192.168.20.4/24 interface=vlan20_gosc network=192.168.20.0
    add address=192.168.100.4/24 interface=vlan100_mgmt network=192.168.100.0
    /ip dhcp-client
    add comment=defconf interface=ether1
    add interface=bridge
    /ip dhcp-server
    add address-pool=default-dhcp disabled=yes interface=bridge name=defconf
    /ip dhcp-server network
    add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
        192.168.88.1
    /ip dns
    set allow-remote-requests=yes
    /ip dns static
    add address=192.168.88.1 comment=defconf name=router.lan
    /ip firewall address-list
    add address=88.90.114.186 comment="Created by script" list="Norwegia kwatera"
    /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 hw-offload=yes
    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=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 hw-offload=yes
    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
    /ip firewall nat
    add action=masquerade chain=srcnat comment="defconf: masquerade" \
        ipsec-policy=out,none out-interface-list=WAN
    add action=masquerade chain=srcnat comment="defconf: masquerade" \
        ipsec-policy=out,none out-interface-list=WAN
    /ipv6 firewall address-list
    add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
    add address=::1/128 comment="defconf: lo" list=bad_ipv6
    add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
    add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
    add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
    add address=100::/64 comment="defconf: discard only " list=bad_ipv6
    add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
    add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
    add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
    /ipv6 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 ICMPv6" protocol=\
        icmpv6
    add action=accept chain=input comment="defconf: accept UDP traceroute" \
        dst-port=33434-33534 protocol=udp
    add action=accept chain=input comment=\
        "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
        udp src-address=fe80::/10
    add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
        protocol=udp
    add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=input comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=input comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    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 packets with bad src ipv6" src-address-list=bad_ipv6
    add action=drop chain=forward comment=\
        "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
    add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
        hop-limit=equal:1 protocol=icmpv6
    add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
        icmpv6
    add action=accept chain=forward comment="defconf: accept HIP" protocol=139
    add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
        500,4500 protocol=udp
    add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=forward comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=forward comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    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 ICMPv6" protocol=\
        icmpv6
    add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
        33434-33534 protocol=udp
    add action=accept chain=input comment=\
        "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
        udp src-address=fe80::/10
    add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
        protocol=udp
    add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=input comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=input comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    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 packets with bad src ipv6" src-address-list=bad_ipv6
    add action=drop chain=forward comment=\
        "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
    add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
        hop-limit=equal:1 protocol=icmpv6
    add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
        icmpv6
    add action=accept chain=forward comment="defconf: accept HIP" protocol=139
    add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
        500,4500 protocol=udp
    add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=forward comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=forward comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    /snmp
    set contact=Wachcio enabled=yes location=Rypin trap-generators=start-trap \
        trap-interfaces=all trap-version=3
    /system clock
    set time-zone-name=Europe/Warsaw
    /system identity
    set name=MikroTikAX2_ogrod
    /system logging
    add action=syslogNG topics=info
    add action=syslogNG topics=error
    add action=syslogNG topics=warning
    add action=syslogNG topics=critical
    add action=syslogNG topics=e-mail
    add action=syslogNG topics=system
    add action=syslogNG topics=account
    add action=syslogNG topics=async
    add action=syslogNG topics=bridge
    add action=syslogNG topics=backup
    add action=syslogNG topics=dhcp
    add action=syslogNG topics=dns
    add action=syslogNG topics=fetch
    add action=syslogNG topics=firewall
    add action=syslogNG topics=health
    add action=syslogNG topics=interface
    add action=syslogNG topics=manager
    add action=syslogNG topics=mqtt
    add action=syslogNG topics=ntp
    add action=syslogNG topics=pppoe
    add action=syslogNG topics=route
    add action=syslogNG topics=script
    add action=syslogNG disabled=yes topics=snmp
    add action=syslogNG topics=ssh
    add action=syslogNG topics=timer
    add action=syslogNG topics=wireless
    add action=syslogNG topics=debug
    add action=syslogNG topics=info
    add action=syslogNG topics=error
    add action=syslogNG topics=warning
    add action=syslogNG topics=critical
    add action=syslogNG topics=e-mail
    add action=syslogNG topics=system
    add action=syslogNG topics=account
    add action=syslogNG topics=async
    add action=syslogNG topics=bridge
    add action=syslogNG topics=backup
    add action=syslogNG topics=dhcp
    add action=syslogNG topics=dns
    add action=syslogNG topics=fetch
    add action=syslogNG topics=firewall
    add action=syslogNG topics=health
    add action=syslogNG topics=interface
    add action=syslogNG topics=manager
    add action=syslogNG topics=mqtt
    add action=syslogNG topics=ntp
    add action=syslogNG topics=pppoe
    add action=syslogNG topics=route
    add action=syslogNG topics=script
    add action=syslogNG disabled=yes topics=snmp
    add action=syslogNG topics=ssh
    add action=syslogNG topics=timer
    add action=syslogNG topics=wireless
    add action=syslogNG topics=debug
    /system note
    set show-at-login=no
    /system ntp client
    set enabled=yes
    /system ntp server
    set enabled=yes manycast=yes multicast=yes use-local-clock=yes
    /system ntp client servers
    add address=194.146.251.100
    add address=150.254.190.51
    add address=193.110.137.171
    add address=109.206.205.233
    add address=158.75.5.245
    /system scheduler
    add interval=1d name=backup_to_email on-event=email-backup-export policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-05-06 start-time=01:00:00
    add interval=1d name=backup_to_ftp on-event=ftp-backup-export policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-05-06 start-time=01:15:00
    add disabled=yes interval=1d name=check_No_IP on-event=check_No_IP policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-06-02 start-time=02:15:00
    /system script
    add dont-require-permissions=no name=email-backup-export owner=wachcio \
        policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        source="{\r\
        \n:log info \"Script backup configuration and send email\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n:local subject \"[BACKUP] MikroTik \$[/system identity get name] backup \
        configuration \$date\"; \r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/tool e-mail send file=\$files to=\"home-network@wachcio.pl\" subject=\"\
        \$subject\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=ftp-backup-export owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="{\
        \r\
        \n# Config\r\
        \n :local server \"192.168.2.5\";\r\
        \n :local username \"mikrotik\";\r\
        \n :local password \"xxxxxxxx\";\r\
        \n:log info \"Script backup configuration and send ftpl\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 2s;\r\
        \n\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameBackup\" dst-path=\"/Backup config/\$filenameBac\
        kup\" address=\"\$server\";\r\
        \n:delay 2s;\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameExport\" dst-path=\"/Backup config/\$filenameExp\
        ort\" address=\"\$server\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=check_No_IP owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
        \_Definiowanie zmiennych\r\
        \n:local url \"http://xxxxxxxx.wachcio.pl/xxxxxxxxxx.txt\"\r\
        \n:local addressListName \"Norwegia kwatera\"\r\
        \n\r\
        \n# Pobranie zawartosci z URL\r\
        \n:local content [/tool fetch url=\$url mode=http dst-path=(\"log.txt\") ;\
        \_:delay 2s ; /file get [/file find name=\"log.txt\"] contents]\r\
        \n\r\
        \n# Wyodrebnienie IP z pobranej zawartosci\r\
        \n:local newIP [:pick \$content 0 [:find \$content \";\"]]\r\
        \n\r\
        \n# Sprawdzenie, czy lista adres\F3w istnieje\r\
        \n:if ([:len [/ip firewall address-list find list=\$addressListName]] > 0)\
        \_do={\r\
        \n    # Pobranie identyfikatora istniejacej reguly\r\
        \n    :local currentID [/ip firewall address-list find list=\$addressListN\
        ame]\r\
        \n    \r\
        \n    # Pobranie obecnego adresu z listy\r\
        \n    :local currentIP [/ip firewall address-list get \$currentID address]\
        \r\
        \n\r\
        \n    # Sprawdzenie, czy adresy sie zgadzaja\r\
        \n    :if (\$currentIP != \$newIP) do={\r\
        \n        # Edycja istniejacej reguly\r\
        \n        /ip firewall address-list set \$currentID address=\$newIP commen\
        t=\"Updated by script\"\r\
        \n        :log info \"Address list updated: \$newIP\"\r\
        \n    } else={\r\
        \n        :log info \"Address list is up-to-date: \$currentIP\"\r\
        \n    }\r\
        \n} else={\r\
        \n    # Jesli lista adres\F3w nie istnieje, dodanie nowego adresu\r\
        \n    /ip firewall address-list add list=\$addressListName address=\$newIP\
        \_comment=\"Created by script\"\r\
        \n    :log info \"Address list created: \$newIP\"\r\
        \n}\r\
        \n\r\
        \n# Usuniecie tymczasowego pliku\r\
        \n/file remove log.txt\r\
        \n"
    /tool e-mail
    set from=<admin@wachcio.pl> port=465 server=wachcio.atthost24.pl tls=yes \
        user=admin@wachcio.pl
    /tool mac-server
    set allowed-interface-list=LAN
    /tool mac-server mac-winbox
    set allowed-interface-list=LAN
    


    Dodano po 17 [minuty]:

    AP na piętrze
    # 2024-07-30 16:54:25 by RouterOS 7.15.2
    # software id = 0YJH-KYWH
    #
    # model = C53UiG+5HPaxD2HPaxD
    # serial number = xxxxxxxxxxxxxx
    /interface bridge
    add admin-mac=D4:01:C3:5A:01:CB auto-mac=no comment=defconf name=bridge \
        port-cost-mode=short
    /interface ethernet
    set [ find default-name=ether2 ] name=ether2_LAN
    /interface wifi
    # managed by CAPsMAN
    # mode: AP, SSID: wachcio_2.4, channel: 2412/ax/Ce
    set [ find default-name=wifi2 ] configuration.manager=capsman .mode=ap \
        disabled=no mtu=1500 name=wifi2_4ghz security.authentication-types=""
    # managed by CAPsMAN
    # mode: AP, SSID: wachcio_5GHz, channel: 5745/ax/Ceee
    set [ find default-name=wifi1 ] configuration.manager=capsman .mode=ap \
        disabled=no name=wifi5ghz security.authentication-types=wpa2-psk,wpa3-psk
    /interface vlan
    add interface=bridge name=vlan10_IoT vlan-id=10
    add interface=bridge name=vlan20_gosc vlan-id=20
    add disabled=yes interface=bridge name=vlan100_mgmt vlan-id=100
    /interface list
    add comment=defconf name=WAN
    add comment=defconf name=LAN
    /interface wifi datapath
    add bridge=bridge disabled=no name=datapath1
    /ip pool
    add name=default-dhcp ranges=192.168.88.10-192.168.88.254
    /system logging action
    add name=syslogNG remote=192.168.2.71 target=remote
    /interface bridge port
    add bridge=bridge comment=defconf interface=ether2_LAN internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether5 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=wifi5ghz internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=wifi2_4ghz internal-path-cost=10 \
        path-cost=10
    /ip firewall connection tracking
    set udp-timeout=10s
    /ip neighbor discovery-settings
    set discover-interface-list=LAN
    /interface bridge vlan
    add bridge=bridge disabled=yes tagged=ether2_LAN vlan-ids=100
    add bridge=bridge tagged=ether2_LAN vlan-ids=10
    add bridge=bridge tagged=ether2_LAN vlan-ids=20
    /interface list member
    add comment=defconf interface=bridge list=LAN
    add comment=defconf interface=ether1 list=WAN
    /interface wifi cap
    set caps-man-addresses=192.168.2.1 discovery-interfaces=bridge enabled=yes \
        slaves-datapath=datapath1
    /ip address
    add address=192.168.10.3/24 interface=vlan10_IoT network=192.168.10.0
    add address=192.168.20.3/24 interface=vlan20_gosc network=192.168.20.0
    add address=192.168.100.3/24 interface=vlan100_mgmt network=192.168.100.0
    /ip dhcp-client
    add comment=defconf interface=ether1
    add interface=bridge
    /ip dhcp-server
    add address-pool=default-dhcp disabled=yes interface=bridge lease-time=10m \
        name=defconf
    /ip dhcp-server network
    add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=\
        192.168.88.1
    /ip dns
    set allow-remote-requests=yes
    /ip dns static
    add address=192.168.88.1 comment=defconf name=router.lan
    /ip firewall address-list
    add address=88.90.111.111 comment="Created by script" list="Norwegia kwatera"
    /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 disabled=yes hw-offload=yes
    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
    /ip firewall nat
    add action=masquerade chain=srcnat comment="defconf: masquerade" \
        ipsec-policy=out,none out-interface-list=WAN
    /ipv6 firewall address-list
    add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
    add address=::1/128 comment="defconf: lo" list=bad_ipv6
    add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
    add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
    add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
    add address=100::/64 comment="defconf: discard only " list=bad_ipv6
    add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
    add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
    add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
    /ipv6 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 ICMPv6" protocol=\
        icmpv6
    add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
        33434-33534 protocol=udp
    add action=accept chain=input comment=\
        "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
        udp src-address=fe80::/10
    add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
        protocol=udp
    add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=input comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=input comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    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 packets with bad src ipv6" src-address-list=bad_ipv6
    add action=drop chain=forward comment=\
        "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
    add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
        hop-limit=equal:1 protocol=icmpv6
    add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
        icmpv6
    add action=accept chain=forward comment="defconf: accept HIP" protocol=139
    add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
        500,4500 protocol=udp
    add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=forward comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=forward comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    /snmp
    set contact=Wachcio enabled=yes location=Rypin trap-generators=start-trap \
        trap-interfaces=all trap-version=3
    /system clock
    set time-zone-name=Europe/Warsaw
    /system identity
    set name=MikroTikAX3_przedpokoj
    /system logging
    add action=syslogNG topics=info
    add action=syslogNG topics=error
    add action=syslogNG topics=warning
    add action=syslogNG topics=critical
    add action=syslogNG topics=e-mail
    add action=syslogNG topics=system
    add action=syslogNG topics=account
    add action=syslogNG topics=async
    add action=syslogNG topics=bridge
    add action=syslogNG topics=backup
    add action=syslogNG topics=dhcp
    add action=syslogNG topics=dns
    add action=syslogNG topics=fetch
    add action=syslogNG topics=firewall
    add action=syslogNG topics=health
    add action=syslogNG topics=interface
    add action=syslogNG topics=manager
    add action=syslogNG topics=mqtt
    add action=syslogNG topics=ntp
    add action=syslogNG topics=pppoe
    add action=syslogNG topics=route
    add action=syslogNG topics=script
    add action=syslogNG disabled=yes topics=snmp
    add action=syslogNG topics=ssh
    add action=syslogNG topics=timer
    add action=syslogNG topics=wireless
    add action=syslogNG topics=debug
    /system note
    set show-at-login=no
    /system ntp client
    set enabled=yes
    /system ntp server
    set enabled=yes manycast=yes multicast=yes use-local-clock=yes
    /system ntp client servers
    add address=194.146.251.100
    add address=150.254.190.51
    add address=193.110.137.171
    add address=109.206.205.233
    add address=158.75.5.245
    /system scheduler
    add interval=1d name=backup_to_email on-event=email-backup-export policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-05-06 start-time=01:00:00
    add interval=1d name=backup_to_ftp on-event=ftp-backup-export policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-05-06 start-time=01:15:00
    add interval=1d name=check_No_IP on-event=check_No_IP policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-06-02 start-time=02:15:00
    /system script
    add dont-require-permissions=no name=email-backup-export owner=wachcio \
        policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        source="{\r\
        \n:log info \"Script backup configuration and send email\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n:local subject \"[BACKUP] MikroTik \$[/system identity get name] backup \
        configuration \$date\"; \r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/tool e-mail send file=\$files to=\"home-network@wachcio.pl\" subject=\"\
        \$subject\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=ftp-backup-export owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="{\
        \r\
        \n# Config\r\
        \n :local server \"192.168.2.5\";\r\
        \n :local username \"mikrotik\";\r\
        \n :local password \"xxxxxxx\";\r\
        \n:log info \"Script backup configuration and send ftpl\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 2s;\r\
        \n\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameBackup\" dst-path=\"/Backup config/\$filenameBac\
        kup\" address=\"\$server\";\r\
        \n:delay 2s;\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameExport\" dst-path=\"/Backup config/\$filenameExp\
        ort\" address=\"\$server\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=check_No_IP owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
        \_Definiowanie zmiennych\r\
        \n:local url \"http://xxxxxx.wachcio.pl/xxxxxx.txt\"\r\
        \n:local addressListName \"Norwegia kwatera\"\r\
        \n\r\
        \n# Pobranie zawartosci z URL\r\
        \n:local content [/tool fetch url=\$url mode=http dst-path=(\"log.txt\") ;\
        \_:delay 2s ; /file get [/file find name=\"log.txt\"] contents]\r\
        \n\r\
        \n# Wyodrebnienie IP z pobranej zawartosci\r\
        \n:local newIP [:pick \$content 0 [:find \$content \";\"]]\r\
        \n\r\
        \n# Sprawdzenie, czy lista adres\F3w istnieje\r\
        \n:if ([:len [/ip firewall address-list find list=\$addressListName]] > 0)\
        \_do={\r\
        \n    # Pobranie identyfikatora istniejacej reguly\r\
        \n    :local currentID [/ip firewall address-list find list=\$addressListN\
        ame]\r\
        \n    \r\
        \n    # Pobranie obecnego adresu z listy\r\
        \n    :local currentIP [/ip firewall address-list get \$currentID address]\
        \r\
        \n\r\
        \n    # Sprawdzenie, czy adresy sie zgadzaja\r\
        \n    :if (\$currentIP != \$newIP) do={\r\
        \n        # Edycja istniejacej reguly\r\
        \n        /ip firewall address-list set \$currentID address=\$newIP commen\
        t=\"Updated by script\"\r\
        \n        :log info \"Address list updated: \$newIP\"\r\
        \n    } else={\r\
        \n        :log info \"Address list is up-to-date: \$currentIP\"\r\
        \n    }\r\
        \n} else={\r\
        \n    # Jesli lista adres\F3w nie istnieje, dodanie nowego adresu\r\
        \n    /ip firewall address-list add list=\$addressListName address=\$newIP\
        \_comment=\"Created by script\"\r\
        \n    :log info \"Address list created: \$newIP\"\r\
        \n}\r\
        \n\r\
        \n# Usuniecie tymczasowego pliku\r\
        \n/file remove log.txt\r\
        \n"
    /tool e-mail
    set from=<admin@wachcio.pl> port=465 server=wachcio.atthost24.pl tls=yes \
        user=admin@wachcio.pl
    /tool mac-server
    set allowed-interface-list=LAN
    /tool mac-server mac-winbox
    set allowed-interface-list=LAN
    
  • #13 21174189
    Konto nie istnieje
    Poziom 1  
  • REKLAMA
  • #14 21174190
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Główny router w salonie do którego jest wpięty ISP

    # 2024-07-30 16:55:17 by RouterOS 7.15.2
    # software id = GNBB-IX7P
    #
    # model = C53UiG+5HPaxD2HPaxD
    # serial number = XXXXXXXXXXXX
    /interface bridge
    add admin-mac=D4:01:C3:5D:9A:8A auto-mac=no comment=defconf name=bridge \
        port-cost-mode=short
    /interface ethernet
    set [ find default-name=ether1 ] name=ether1_LAN_CRS326 poe-out=off
    set [ find default-name=ether5 ] name=ether5_WAN
    /interface pppoe-client
    add add-default-route=yes disabled=no interface=ether5_WAN name=pppoe-out1 \
        use-peer-dns=yes user=XXXXXXXXXX
    /interface vlan
    add interface=bridge name=vlan10_IoT vlan-id=10
    add interface=bridge name=vlan20_gosc vlan-id=20
    add disabled=yes interface=bridge name=vlan100_mgmt vlan-id=100
    /interface list
    add comment=defconf name=WAN
    add comment=defconf name=LAN
    /interface wifi channel
    add band=2ghz-ax disabled=no frequency=2412 name=2_ax_40mhz_ch3 width=\
        20/40mhz-Ce
    add band=2ghz-ax disabled=no frequency=2442 name=2_ax_40mhz_ch11 width=\
        20/40mhz-Ce
    add band=2ghz-ax frequency=2412 name=2_ax_ch1 width=20mhz
    add band=2ghz-ax frequency=2422 name=2_ax_ch5 width=20mhz
    add band=2ghz-ax frequency=2442 name=2_ax_ch9 width=20mhz
    add band=2ghz-ax frequency=2462 name=2_ax_ch11 width=20mhz
    add band=2ghz-n disabled=no frequency=2412 name=2_n_ch1 width=20/40mhz-Ce
    add band=2ghz-n frequency=2422 name=2_n_ch5 width=20mhz
    add band=2ghz-n frequency=2442 name=2_n_ch9 width=20mhz
    add band=2ghz-n frequency=2462 name=2_n_ch11 width=20mhz
    add band=5ghz-ax frequency=5180 name=5_ax_ch42 width=20/40/80mhz
    add band=5ghz-ax frequency=5260 name=5_ax_ch58 width=20/40/80mhz
    add band=5ghz-ax frequency=5500 name=5_ax_ch106 width=20/40/80mhz
    add band=5ghz-ax frequency=5580 name=5_ax_ch122 width=20/40/80mhz
    add band=5ghz-ax frequency=5660 name=5_ax_ch138 width=20/40/80mhz
    add band=5ghz-ax frequency=5745 name=5_ax_ch155 width=20/40/80mhz
    add band=5ghz-ax frequency=5825 name=5_ax_ch171 width=20/40/80mhz
    add band=2ghz-ax disabled=no frequency=2412 name=2_ax_40mhz_ch1 width=\
        20/40mhz-Ce
    add band=2ghz-ax disabled=no frequency=2412 name=2_ax_80mhz_ch1 width=\
        20/40/80mhz
    /interface wifi datapath
    add bridge=bridge disabled=no name=datapath_dom
    add bridge=bridge disabled=no name=datapath_gosc vlan-id=20
    add bridge=bridge disabled=no name=datapath_IoT vlan-id=10
    /interface wifi security
    add authentication-types=wpa2-psk,wpa3-psk disabled=no name=sec_wifi_dom wps=\
        disable
    add authentication-types=wpa2-psk,wpa3-psk disabled=no name=sec_wifi_IoT wps=\
        disable
    add authentication-types=wpa2-psk,wpa3-psk disabled=no name=sec_wifi_gosc \
        wps=disable
    /interface wifi steering
    add disabled=no name=steering1 neighbor-group=dynamic-wachcio_5GHz-bb010fb1 \
        rrm=yes wnm=yes
    /interface wifi configuration
    add channel=2_ax_40mhz_ch1 country="United States" datapath=datapath_dom \
        disabled=no mode=ap name=cfg_wifi_dom_2_4 security=sec_wifi_dom \
        security.authentication-types=wpa2-psk,wpa3-psk ssid=wachcio_2.4 \
        steering=steering1
    add channel=5_ax_ch155 channel.skip-dfs-channels=all country="United States" \
        datapath=datapath_dom disabled=no mode=ap name=cfg_wifi_dom_5 security=\
        sec_wifi_dom security.authentication-types=wpa2-psk,wpa3-psk ssid=\
        wachcio_5GHz steering=steering1
    add channel=2_n_ch11 country="United States" datapath=datapath_IoT disabled=\
        no mode=ap name=cfg_wifi_IoT_2_4 security=sec_wifi_IoT \
        security.authentication-types=wpa2-psk,wpa3-psk ssid=wachcio_IoT \
        steering=steering1 tx-power=40
    add channel=5_ax_ch155 channel.skip-dfs-channels=all country="United States" \
        datapath=datapath_gosc disabled=no mode=ap name=cfg_wifi_gosc_5 security=\
        sec_wifi_gosc security.authentication-types=wpa2-psk,wpa3-psk ssid=\
        wachcio_gosc_5GHz steering=steering1 tx-power=40
    add channel=2_ax_40mhz_ch3 channel.band=2ghz-ax .skip-dfs-channels=all \
        country="United States" datapath=datapath_gosc disabled=no mode=ap name=\
        cfg_wifi_gosc_2 security=sec_wifi_gosc security.authentication-types=\
        wpa2-psk,wpa3-psk ssid=wachcio_gosc_2.4GHz steering=steering1 tx-power=40
    /interface wifi
    add configuration=cfg_wifi_dom_2_4 disabled=no name=\
        cap-MikroTikAX2_ogrod-2.4ghz radio-mac=48:A9:8A:F4:19:D6
    add configuration=cfg_wifi_IoT_2_4 disabled=no mac-address=4A:A9:8A:F4:19:D6 \
        master-interface=cap-MikroTikAX2_ogrod-2.4ghz name=\
        cap-MikroTikAX2_ogrod-2.4ghz2
    add configuration=cfg_wifi_gosc_2 disabled=no mac-address=4A:A9:8A:F4:19:D7 \
        master-interface=cap-MikroTikAX2_ogrod-2.4ghz name=\
        cap-MikroTikAX2_ogrod-2.4ghz3
    add configuration=cfg_wifi_dom_5 disabled=no name=cap-MikroTikAX2_ogrod-5ghz \
        radio-mac=48:A9:8A:F4:19:D5
    add configuration=cfg_wifi_gosc_5 disabled=no mac-address=4A:A9:8A:F4:19:D5 \
        master-interface=cap-MikroTikAX2_ogrod-5ghz name=\
        cap-MikroTikAX2_ogrod-5ghz2
    add configuration=cfg_wifi_dom_2_4 disabled=no name=\
        cap-MikroTikAX3_przedpokoj-2.4ghz radio-mac=D4:01:C3:5A:01:D0
    add configuration=cfg_wifi_IoT_2_4 disabled=no mac-address=D6:01:C3:5A:01:D0 \
        master-interface=cap-MikroTikAX3_przedpokoj-2.4ghz name=\
        cap-MikroTikAX3_przedpokoj-2.4ghz2
    add configuration=cfg_wifi_gosc_2 disabled=no mac-address=D6:01:C3:5A:01:D1 \
        master-interface=cap-MikroTikAX3_przedpokoj-2.4ghz name=\
        cap-MikroTikAX3_przedpokoj-2.4ghz3
    add configuration=cfg_wifi_dom_5 disabled=no name=\
        cap-MikroTikAX3_przedpokoj-5ghz radio-mac=D4:01:C3:5A:01:CF
    add configuration=cfg_wifi_gosc_5 disabled=no mac-address=D6:01:C3:5A:01:CF \
        master-interface=cap-MikroTikAX3_przedpokoj-5ghz name=\
        cap-MikroTikAX3_przedpokoj-5ghz2
    set [ find default-name=wifi2 ] channel.frequency=2412 configuration=\
        cfg_wifi_dom_2_4 configuration.mode=ap disabled=no name=wifi2_4ghz
    set [ find default-name=wifi1 ] channel.frequency=5745 configuration=\
        cfg_wifi_dom_5 configuration.mode=ap disabled=no name=wifi5ghz security=\
        sec_wifi_dom security.authentication-types=wpa2-psk,wpa3-psk steering=\
        steering1
    add channel.frequency=2412 configuration=cfg_wifi_IoT_2_4 configuration.mode=\
        ap datapath=datapath_dom disabled=no mac-address=D6:01:C3:5D:9A:8E \
        master-interface=wifi2_4ghz name=wifi_IoT security=sec_wifi_IoT steering=\
        steering1
    add channel.frequency=2412 configuration=cfg_wifi_gosc_2 configuration.mode=\
        ap datapath.vlan-id=20 disabled=no mac-address=D6:01:C3:5D:9A:90 \
        master-interface=wifi2_4ghz name=wifi_gosc_2.4ghz
    add channel.frequency=5745 configuration=cfg_wifi_gosc_5 configuration.mode=\
        ap datapath.vlan-id=20 disabled=no mac-address=D6:01:C3:5D:9A:8F \
        master-interface=wifi5ghz name=wifi_gosc_5ghz
    /ip pool
    add name=dhcp ranges=192.168.2.200-192.168.2.240
    /system logging action
    add name=syslogNG remote=192.168.2.71 target=remote
    /interface bridge port
    add bridge=bridge comment=defconf interface=ether2 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether3 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether4 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=wifi5ghz internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=wifi2_4ghz internal-path-cost=10 \
        path-cost=10
    add bridge=bridge interface=ether1_LAN_CRS326
    /ip firewall connection tracking
    set udp-timeout=10s
    /ip neighbor discovery-settings
    set discover-interface-list=LAN
    /interface bridge vlan
    add bridge=bridge disabled=yes tagged=ether1_LAN_CRS326 vlan-ids=100
    add bridge=bridge tagged=ether1_LAN_CRS326 vlan-ids=10
    add bridge=bridge tagged=ether1_LAN_CRS326 vlan-ids=20
    /interface list member
    add comment=defconf interface=bridge list=LAN
    add comment=defconf interface=ether5_WAN list=WAN
    add interface=*9 list=WAN
    add interface=pppoe-out1 list=WAN
    /interface wifi access-list
    add action=accept disabled=no interface=wifi5ghz signal-range=-75..0
    add action=accept disabled=no interface=wifi_gosc_5ghz signal-range=-75..0
    add action=accept disabled=no interface=*8A signal-range=-75..0
    add action=accept disabled=no interface=*85 signal-range=-75..0
    add action=reject disabled=no interface=*85
    add action=reject disabled=no interface=wifi_gosc_5ghz
    add action=reject disabled=no interface=wifi5ghz
    add action=reject disabled=no interface=*8A
    /interface wifi cap
    set discovery-interfaces=bridge
    /interface wifi capsman
    set enabled=yes interfaces=bridge package-path="" require-peer-certificate=no \
        upgrade-policy=none
    /interface wifi provisioning
    add action=create-enabled disabled=no master-configuration=cfg_wifi_dom_2_4 \
        name-format=cap-%I-2.4ghz slave-configurations=\
        cfg_wifi_IoT_2_4,cfg_wifi_gosc_2 supported-bands=2ghz-ax
    add action=create-enabled disabled=no master-configuration=cfg_wifi_dom_5 \
        name-format=cap-%I-5ghz slave-configurations=cfg_wifi_gosc_5 \
        supported-bands=5ghz-ax
    /ip address
    add address=192.168.2.1/24 comment=defconf interface=bridge network=\
        192.168.2.0
    add address=192.168.10.1/24 interface=vlan10_IoT network=192.168.10.0
    add address=192.168.20.1/24 interface=vlan20_gosc network=192.168.20.0
    add address=192.168.100.1/24 interface=vlan100_mgmt network=192.168.100.0
    /ip arp
    add address=192.168.2.2 comment="Synology NAS" interface=bridge mac-address=\
        00:11:32:49:85:D9
    add address=192.168.2.5 comment=TrueNAS interface=bridge mac-address=\
        4C:52:62:10:8B:8C
    add address=192.168.2.10 comment=Fronius interface=bridge mac-address=\
        00:03:AC:3A:E0:29
    add address=192.168.2.20 comment="Sterowanie w kotlowni (ESP 32)" interface=\
        bridge mac-address=34:B4:72:4E:17:34
    add address=192.168.2.110 interface=bridge mac-address=E8:A0:ED:F1:44:78
    /ip dhcp-client
    add comment=defconf disabled=yes interface=ether1_LAN_CRS326
    add comment=defconf disabled=yes interface=ether1_LAN_CRS326
    /ip dns
    set allow-remote-requests=yes
    /ip dns static
    add address=192.168.2.1 comment=defconf name=router.lan
    /ip firewall address-list
    add address=192.168.2.110-192.168.2.112 list=kamery
    add address=185.255.111.111 list=Atthost
    add address=88.90.111.111 list="Norwegia kwatera"
    add address=192.168.2.70-192.168.2.72 list=Local_DNS
    /ip firewall filter
    add action=accept chain=forward comment="AdGuard Home DNS VLAN-y" \
        dst-address-list=Local_DNS dst-port=53 in-interface=all-vlan protocol=udp
    add action=accept chain=forward comment="AdGuard Home DNS VLAN-y" \
        dst-address-list=Local_DNS dst-port=853 in-interface=all-vlan protocol=\
        udp
    add action=accept chain=input comment="WinBox AX2" log=yes log-prefix=\
        Winbox_AX2_filter src-address-list="Norwegia kwatera"
    add action=accept chain=input disabled=yes log-prefix=kamery_log \
        src-address-list=kamery
    add action=drop chain=forward comment=\
        "Blokada wyjscia do internetu dla kamer" log-prefix=kamera out-interface=\
        pppoe-out1 src-address-list=kamery
    add action=drop chain=forward comment=\
        "Blokada wyjscia do internetu dla oczyszczacza" log-prefix=oczyszczacz \
        out-interface=pppoe-out1 src-address=192.168.10.40
    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 disabled=yes hw-offload=yes
    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
    /ip firewall nat
    add action=dst-nat chain=dstnat comment="Fronius Atthost" dst-port=81 \
        log-prefix=fronius protocol=tcp src-address-list=Atthost to-addresses=\
        192.168.2.10 to-ports=80
    add action=dst-nat chain=dstnat comment="Nawodnienie sterowanie Atthost" \
        dst-port=7000 log-prefix=fronius protocol=udp src-address-list=Atthost \
        to-addresses=192.168.2.40 to-ports=7000
    add action=dst-nat chain=dstnat comment="Fronius Norwegia" dst-port=81 \
        log-prefix=fronius protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.10 to-ports=80
    add action=dst-nat chain=dstnat comment="Winbox AX2" dst-port=8291 log=yes \
        log-prefix=Winbox_AX2_NAT protocol=tcp src-address-list=\
        "Norwegia kwatera" to-addresses=192.168.2.1 to-ports=8291
    add action=dst-nat chain=dstnat comment="SSH TrueNAS" dst-port=20022 \
        log-prefix=fronius protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.5 to-ports=22
    add action=dst-nat chain=dstnat comment="SSH Rpidocker2" dst-port=20222 \
        log-prefix=rpidocker2_z protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.71 to-ports=32323
    add action=dst-nat chain=dstnat comment="SSH Rpidocker" dst-port=20122 \
        log-prefix=rpidocker_z protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.70 to-ports=49494
    add action=dst-nat chain=dstnat comment="AdGuard rpidocker" dst-port=3000 \
        log-prefix=fronius protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.70 to-ports=3000
    add action=dst-nat chain=dstnat comment="AdGuard rpidocker2" dst-port=3001 \
        log-prefix=fronius protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.70 to-ports=3000
    add action=dst-nat chain=dstnat comment="TrueNAS Norwegia" dst-port=20443 \
        log-prefix=trueNAS protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.5 to-ports=20443
    add action=dst-nat chain=dstnat comment="TrueNAS shinobi Norwegia" dst-port=\
        28081 log-prefix=shinobi protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.5 to-ports=28081
    add action=dst-nat chain=dstnat comment="Proxmox Norwegia" dst-port=8006 \
        log-prefix=proxmox protocol=tcp src-address-list="Norwegia kwatera" \
        to-addresses=192.168.2.250 to-ports=8006
    add action=dst-nat chain=dstnat comment="Fronius z LAN" dst-port=81 \
        log-prefix=fronius protocol=tcp src-address=192.168.2.0/24 to-addresses=\
        192.168.2.10 to-ports=80
    add action=masquerade chain=srcnat comment="defconf: masquerade" \
        ipsec-policy=out,none out-interface-list=WAN
    add action=masquerade chain=srcnat comment="Harpin NAT" dst-address=\
        !192.168.2.1 src-address=192.168.2.0/24
    /ip firewall service-port
    set sip disabled=yes
    /ip service
    set telnet disabled=yes
    set ftp disabled=yes
    set www disabled=yes
    set api disabled=yes
    set api-ssl disabled=yes
    /ip ssh
    set host-key-type=ed25519
    /ipv6 firewall address-list
    add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
    add address=::1/128 comment="defconf: lo" list=bad_ipv6
    add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
    add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
    add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
    add address=100::/64 comment="defconf: discard only " list=bad_ipv6
    add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
    add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
    add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
    /ipv6 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 ICMPv6" protocol=\
        icmpv6
    add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
        33434-33534 protocol=udp
    add action=accept chain=input comment=\
        "defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
        udp src-address=fe80::/10
    add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
        protocol=udp
    add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=input comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=input comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    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 packets with bad src ipv6" src-address-list=bad_ipv6
    add action=drop chain=forward comment=\
        "defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
    add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
        hop-limit=equal:1 protocol=icmpv6
    add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
        icmpv6
    add action=accept chain=forward comment="defconf: accept HIP" protocol=139
    add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
        500,4500 protocol=udp
    add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
        ipsec-ah
    add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
        ipsec-esp
    add action=accept chain=forward comment=\
        "defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
    add action=drop chain=forward comment=\
        "defconf: drop everything else not coming from LAN" in-interface-list=\
        !LAN
    /snmp
    set contact=Wachcio enabled=yes location=Rypin trap-generators=start-trap \
        trap-interfaces=all trap-version=3
    /system clock
    set time-zone-name=Europe/Warsaw
    /system identity
    set name=MikroTikAX3_salon
    /system logging
    add action=syslogNG topics=info
    add action=syslogNG topics=error
    add action=syslogNG topics=warning
    add action=syslogNG topics=critical
    add action=syslogNG topics=e-mail
    add action=syslogNG topics=system
    add action=syslogNG topics=account
    add action=syslogNG topics=async
    add action=syslogNG topics=bridge
    add action=syslogNG topics=backup
    add action=syslogNG topics=dhcp
    add action=syslogNG topics=dns
    add action=syslogNG topics=fetch
    add action=syslogNG topics=firewall
    add action=syslogNG topics=health
    add action=syslogNG topics=interface
    add action=syslogNG topics=manager
    add action=syslogNG topics=mqtt
    add action=syslogNG topics=ntp
    add action=syslogNG topics=pppoe
    add action=syslogNG topics=route
    add action=syslogNG topics=script
    add action=syslogNG disabled=yes topics=snmp
    add action=syslogNG topics=ssh
    add action=syslogNG topics=timer
    add action=syslogNG topics=wireless
    add action=syslogNG topics=debug
    /system note
    set show-at-login=no
    /system ntp client
    set enabled=yes
    /system ntp server
    set enabled=yes manycast=yes multicast=yes use-local-clock=yes
    /system ntp client servers
    add address=194.146.251.100
    add address=150.254.190.51
    add address=193.110.137.171
    add address=109.206.205.233
    add address=158.75.5.245
    /system scheduler
    add interval=1d name=backup_to_email on-event=email-backup-export policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-05-06 start-time=01:00:00
    add interval=1d name=backup_to_ftp on-event=ftp-backup-export policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-05-06 start-time=01:15:00
    add interval=1d name=check_No_IP on-event=check_No_IP policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-06-02 start-time=02:15:00
    /system script
    add dont-require-permissions=no name=email-backup-export owner=wachcio \
        policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        source="{\r\
        \n:log info \"Script backup configuration and send email\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n:local subject \"[BACKUP] MikroTik \$[/system identity get name] backup \
        configuration \$date\"; \r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/tool e-mail send file=\$files to=\"home-network@wachcio.pl\" subject=\"\
        \$subject\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=ftp-backup-export owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="{\
        \r\
        \n# Config\r\
        \n :local server \"192.168.2.5\";\r\
        \n :local username \"mikrotik\";\r\
        \n :local password \"xxxxxxxx\";\r\
        \n:log info \"Script backup configuration and send ftpl\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 2s;\r\
        \n\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameBackup\" dst-path=\"/Backup config/\$filenameBac\
        kup\" address=\"\$server\";\r\
        \n:delay 2s;\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameExport\" dst-path=\"/Backup config/\$filenameExp\
        ort\" address=\"\$server\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=check_NO_IP owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#\
        \_Definiowanie zmiennych\r\
        \n:local url \"http://xxxxx.wachcio.pl/xxxxxx.txt\"\r\
        \n:local addressListName \"Norwegia kwatera\"\r\
        \n\r\
        \n# Pobranie zawartosci z URL\r\
        \n:local content [/tool fetch url=\$url mode=http dst-path=(\"log.txt\") ;\
        \_:delay 2s ; /file get [/file find name=\"log.txt\"] contents]\r\
        \n\r\
        \n# Wyodrebnienie IP z pobranej zawartosci\r\
        \n:local newIP [:pick \$content 0 [:find \$content \";\"]]\r\
        \n\r\
        \n# Sprawdzenie, czy lista adres\F3w istnieje\r\
        \n:if ([:len [/ip firewall address-list find list=\$addressListName]] > 0)\
        \_do={\r\
        \n    # Pobranie identyfikatora istniejacej reguly\r\
        \n    :local currentID [/ip firewall address-list find list=\$addressListN\
        ame]\r\
        \n    \r\
        \n    # Pobranie obecnego adresu z listy\r\
        \n    :local currentIP [/ip firewall address-list get \$currentID address]\
        \r\
        \n\r\
        \n    # Sprawdzenie, czy adresy sie zgadzaja\r\
        \n    :if (\$currentIP != \$newIP) do={\r\
        \n        # Edycja istniejacej reguly\r\
        \n        /ip firewall address-list set \$currentID address=\$newIP commen\
        t=\"Updated by script\"\r\
        \n        :log info \"Address list updated: \$newIP\"\r\
        \n    } else={\r\
        \n        :log info \"Address list is up-to-date: \$currentIP\"\r\
        \n    }\r\
        \n} else={\r\
        \n    # Jesli lista adres\F3w nie istnieje, dodanie nowego adresu\r\
        \n    /ip firewall address-list add list=\$addressListName address=\$newIP\
        \_comment=\"Created by script\"\r\
        \n    :log info \"Address list created: \$newIP\"\r\
        \n}\r\
        \n\r\
        \n# Usuniecie tymczasowego pliku\r\
        \n/file remove log.txt\r\
        \n"
    /tool e-mail
    set from=<admin@wachcio.pl> port=465 server=wachcio.atthost24.pl tls=yes \
        user=admin@wachcio.pl
    /tool mac-server
    set allowed-interface-list=LAN
    /tool mac-server mac-winbox
    set allowed-interface-list=LAN
    


    Dodano po 1 [minuty]:

    Switch CRS
    # 2024-07-30 16:54:59 by RouterOS 7.15.1
    # software id = 1T3F-59YP
    #
    # model = CRS326-24G-2S+
    # serial number = xxxxxxxxxxxxx
    /interface bridge
    add admin-mac=78:9A:18:E7:E8:30 auto-mac=no comment=defconf name=bridge \
        port-cost-mode=short
    /interface ethernet
    set [ find default-name=ether1 ] name=ether1_salon_AX3
    set [ find default-name=ether2 ] name=ether2_garaz
    set [ find default-name=ether3 ] name=ether3_mamusia
    set [ find default-name=ether4 ] disabled=yes name=ether4_zielony
    set [ find default-name=ether5 ] name=ether5_sypialnia
    set [ find default-name=ether6 ] name=ether6_goscinny_AX3_przedpokoj
    set [ find default-name=ether7 ] disabled=yes name=ether7_dzieci_Macius
    set [ find default-name=ether8 ] disabled=yes name=ether8_dzieci_Wojtek
    set [ find default-name=ether9 ] name=ether9_domek_ogrodowy_AX2
    set [ find default-name=ether10 ] name=ether10_proxmox
    set [ find default-name=ether11 ] disabled=yes
    set [ find default-name=ether12 ] disabled=yes
    set [ find default-name=ether13 ] disabled=yes
    set [ find default-name=ether14 ] disabled=yes
    set [ find default-name=ether15 ] disabled=yes
    set [ find default-name=ether16 ] disabled=yes
    set [ find default-name=ether17 ] disabled=yes
    set [ find default-name=ether18 ] disabled=yes
    set [ find default-name=ether19 ] name=ether19_switch_Netgear_kamery
    set [ find default-name=ether20 ] disabled=yes
    set [ find default-name=ether21 ] name=ether21_rpi_docker2
    set [ find default-name=ether22 ] name=ether22_rpi_docker
    set [ find default-name=ether23 ] name=ether23_TrueNAS
    set [ find default-name=ether24 ] name=ether24_Synology_NAS
    set [ find default-name=sfp-sfpplus1 ] disabled=yes
    set [ find default-name=sfp-sfpplus2 ] disabled=yes
    /interface vlan
    add interface=bridge name=vlan10_IoT vlan-id=10
    add interface=bridge name=vlan20_gosc vlan-id=20
    add disabled=yes interface=bridge name=vlan100_mgmt vlan-id=100
    /interface list
    add name=WAN
    add name=LAN
    /interface wireless security-profiles
    set [ find default=yes ] supplicant-identity=MikroTik
    /ip pool
    add name=dhcp_pool_dom ranges=192.168.2.200-192.168.2.240
    add name=dhcp_pool_IoT ranges=192.168.10.200-192.168.10.240
    add name=dhcp_pool_gosc ranges=192.168.20.200-192.168.20.240
    add name=dhcp_pool_mgmt ranges=192.168.100.200-192.168.100.240
    /ip dhcp-server
    add address-pool=dhcp_pool_dom interface=bridge lease-time=2m name=dhcp_dom
    add address-pool=dhcp_pool_IoT interface=vlan10_IoT lease-time=2m name=\
        dhcp_IoT
    add address-pool=dhcp_pool_gosc interface=vlan20_gosc lease-time=2m name=\
        dhcp_gosc
    add address-pool=dhcp_pool_gosc interface=vlan100_mgmt lease-time=2m name=\
        dhcp_mgmt
    /port
    set 0 name=serial0
    /system logging action
    add name=syslogNG remote=192.168.2.71 target=remote
    /interface bridge port
    add bridge=bridge comment=defconf interface=ether1_salon_AX3 \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether2_garaz internal-path-cost=\
        10 path-cost=10
    add bridge=bridge comment=defconf interface=ether3_mamusia \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether4_zielony \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether5_sypialnia \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether6_goscinny_AX3_przedpokoj \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether7_dzieci_Macius \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether8_dzieci_Wojtek \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether9_domek_ogrodowy_AX2 \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether10_proxmox \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether11 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether12 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether13 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether14 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether15 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether16 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether17 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether18 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether19_switch_Netgear_kamery \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether20 internal-path-cost=10 \
        path-cost=10
    add bridge=bridge comment=defconf interface=ether21_rpi_docker2 \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether22_rpi_docker \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether23_TrueNAS \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=ether24_Synology_NAS \
        internal-path-cost=10 path-cost=10
    add bridge=bridge comment=defconf interface=sfp-sfpplus1 internal-path-cost=\
        10 path-cost=10
    add bridge=bridge comment=defconf interface=sfp-sfpplus2 internal-path-cost=\
        10 path-cost=10
    /ip firewall connection tracking
    set udp-timeout=10s
    /ip neighbor discovery-settings
    set discover-interface-list=LAN
    /interface bridge vlan
    add bridge=bridge disabled=yes tagged=ether1_salon_AX3 vlan-ids=100
    add bridge=bridge tagged=\
        ether1_salon_AX3,ether6_goscinny_AX3_przedpokoj,ether9_domek_ogrodowy_AX2 \
        vlan-ids=10
    add bridge=bridge tagged=\
        ether1_salon_AX3,ether6_goscinny_AX3_przedpokoj,ether9_domek_ogrodowy_AX2 \
        vlan-ids=20
    /interface list member
    add interface=ether1_salon_AX3 list=WAN
    add interface=ether2_garaz list=LAN
    add interface=ether3_mamusia list=LAN
    add interface=ether4_zielony list=LAN
    add interface=ether5_sypialnia list=LAN
    add interface=ether6_goscinny_AX3_przedpokoj list=LAN
    add interface=ether7_dzieci_Macius list=LAN
    add interface=ether8_dzieci_Wojtek list=LAN
    add interface=ether9_domek_ogrodowy_AX2 list=LAN
    add interface=ether10_proxmox list=LAN
    add interface=ether11 list=LAN
    add interface=ether12 list=LAN
    add interface=ether13 list=LAN
    add interface=ether14 list=LAN
    add interface=ether15 list=LAN
    add interface=ether16 list=LAN
    add interface=ether17 list=LAN
    add interface=ether18 list=LAN
    add interface=ether19_switch_Netgear_kamery list=LAN
    add interface=ether20 list=LAN
    add interface=ether21_rpi_docker2 list=LAN
    add interface=ether22_rpi_docker list=LAN
    add interface=ether23_TrueNAS list=LAN
    add interface=ether24_Synology_NAS list=LAN
    add interface=sfp-sfpplus1 list=LAN
    add interface=sfp-sfpplus2 list=LAN
    /ip address
    add address=192.168.2.6/24 interface=bridge network=192.168.2.0
    add address=192.168.20.6/24 interface=vlan20_gosc network=192.168.20.0
    add address=192.168.10.6/24 interface=vlan10_IoT network=192.168.10.0
    add address=192.168.100.6/24 interface=vlan100_mgmt network=192.168.100.0
    /ip arp
    add address=192.168.2.4 interface=bridge mac-address=90:9A:4A:54:CC:50
    /ip dhcp-client
    add interface=bridge
    /ip dhcp-server lease
    add address=192.168.2.32 comment="Dekoder w salonie" disabled=yes \
        mac-address=00:21:FF:DC:D7:7A server=dhcp_dom
    add address=192.168.2.171 client-id=1:e4:a8:df:fb:e7:d1 comment=\
        "Laptop Marcin - LAN" mac-address=E4:A8:DF:FB:E7:D1 server=dhcp_dom
    add address=192.168.2.50 client-id=1:14:cb:19:9e:7c:ca comment=\
        "Drukarka HP Smart Tank" mac-address=14:CB:19:9E:7C:CA server=dhcp_dom
    add address=192.168.2.31 comment="Dekoder w mamusi" mac-address=\
        00:21:FF:B9:2A:F3 server=dhcp_dom
    add address=192.168.2.82 client-id=1:64:57:25:6d:40:d5 comment="TV TCL" \
        mac-address=64:57:25:6D:40:D5 server=dhcp_dom
    add address=192.168.2.110 client-id=1:e8:a0:ed:f1:44:78 comment=\
        "Kamera taras" mac-address=E8:A0:ED:F1:44:78 server=dhcp_dom
    add address=192.168.2.111 client-id=1:80:be:af:c5:4c:47 comment=\
        "Kamera brama" mac-address=80:BE:AF:C5:4C:47 server=dhcp_dom
    add address=192.168.2.112 client-id=1:e8:a0:ed:f1:44:8a comment=\
        "Kamera ognisko" mac-address=E8:A0:ED:F1:44:8A server=dhcp_dom
    add address=192.168.2.71 client-id=1:b8:27:eb:d5:a0:86 comment="Rpi docker 2" \
        mac-address=B8:27:EB:D5:A0:86 server=dhcp_dom
    add address=192.168.2.131 client-id=1:0:c3:a:ef:7b:98 comment=\
        "Nowy telefon Ulki" mac-address=00:C3:0A:EF:7B:98 server=dhcp_dom
    add address=192.168.2.132 client-id=1:32:3d:e8:2f:19:40 comment=\
        "Telefon mamusi" mac-address=32:3D:E8:2F:19:40 server=dhcp_dom
    add address=192.168.2.133 client-id=1:9c:bc:f0:48:34:74 comment=\
        "Telefon Marcina" mac-address=9C:BC:F0:48:34:74 server=dhcp_dom
    add address=192.168.2.130 client-id=1:f0:43:47:9:2b:f1 comment=\
        "Stary tel Ulki" mac-address=F0:43:47:09:2B:F1 server=dhcp_dom
    add address=192.168.2.134 client-id=1:66:6c:a7:5:e2:55 comment=\
        "telefon Marcina" mac-address=66:6C:A7:05:E2:55 server=dhcp_dom
    add address=192.168.2.5 comment=TrueNAS mac-address=4C:52:62:10:8B:8C server=\
        dhcp_dom
    add address=192.168.2.135 client-id=1:ca:34:9d:97:e9:ae comment=\
        "Telefon Marcina - Moto G54" mac-address=CA:34:9D:97:E9:AE server=\
        dhcp_dom
    add address=192.168.2.72 client-id=\
        ff:11:97:16:b:0:1:0:1:2e:17:2e:88:bc:24:11:97:16:b comment=\
        "AdGuard Home - proxmox" mac-address=BC:24:11:97:16:0B server=dhcp_dom
    add address=192.168.2.92 client-id=1:2:27:88:98:54:e2 comment=\
        "Home Assistant proxmox" mac-address=02:27:88:98:54:E2 server=dhcp_dom
    add address=192.168.2.93 client-id=\
        ff:11:87:ba:4f:0:1:0:1:2e:17:f8:81:bc:24:11:87:ba:4f comment=\
        "Node-Red Proxmox" mac-address=BC:24:11:87:BA:4F server=dhcp_dom
    add address=192.168.2.94 client-id=\
        ff:11:89:ac:f7:0:1:0:1:2e:17:fa:36:bc:24:11:89:ac:f7 comment=\
        "MQTT proxmox" mac-address=BC:24:11:89:AC:F7 server=dhcp_dom
    add address=192.168.2.95 client-id=\
        ff:11:4c:e4:65:0:1:0:1:2e:17:fb:34:bc:24:11:4c:e4:65 comment=\
        "MariaDB proxmox" mac-address=BC:24:11:4C:E4:65 server=dhcp_dom
    add address=192.168.2.96 client-id=\
        ff:18:d4:25:e6:0:2:0:0:ab:11:e8:d1:9b:60:2b:8a:45:3b comment=\
        "Shinobi proxmox" mac-address=BC:24:11:6E:55:6B server=dhcp_dom
    add address=192.168.2.3 client-id=1:d4:1:c3:5a:1:cb comment=\
        "Mikrotik AX3 przedpok\F3j" mac-address=D4:01:C3:5A:01:CB server=dhcp_dom
    add address=192.168.2.4 client-id=1:48:a9:8a:f4:19:d1 comment=\
        "Miktrotik AX2 ogr\F3d" mac-address=48:A9:8A:F4:19:D1 server=dhcp_dom
    add address=192.168.2.10 client-id=1:0:3:ac:3a:e0:29 comment=Fronius \
        mac-address=00:03:AC:3A:E0:29 server=dhcp_dom
    add address=192.168.2.70 client-id=\
        ff:eb:ca:f2:c:0:1:0:1:2e:36:ad:99:b8:27:eb:ca:f2:c comment="Rpi Docker" \
        mac-address=B8:27:EB:CA:F2:0C server=dhcp_dom
    add address=192.168.2.35 comment="LedDimmerPro v6" disabled=yes mac-address=\
        FC:F5:C4:AC:0F:E3 server=dhcp_dom
    add address=192.168.2.30 comment="Dekoder salon wifi" mac-address=\
        00:21:FF:DC:D7:7B server=dhcp_dom
    add address=192.168.2.7 comment="Switch Netgear" mac-address=\
        C4:04:15:A5:3A:4A server=dhcp_dom
    add address=192.168.10.11 comment=Nawodnienie mac-address=F0:FE:6B:28:10:1E \
        server=dhcp_IoT
    add address=192.168.10.21 comment=\
        "Temperatury w kotlowni i na g\F3rze (ESP 32) Nettemp" mac-address=\
        58:BF:25:D9:E1:45 server=dhcp_IoT
    add address=192.168.10.15 comment="Zegar w salonie" mac-address=\
        AC:CF:23:57:C0:04 server=dhcp_IoT
    add address=192.168.10.13 comment="Swiatlo w kuchni" mac-address=\
        F0:FE:6B:28:1F:82 server=dhcp_IoT
    add address=192.168.10.31 comment="Temperatura w akwarium (ESP32)" \
        mac-address=18:FE:34:E8:3E:65 server=dhcp_IoT
    add address=192.168.10.20 client-id=1:34:b4:72:4e:17:34 comment=\
        "ESP32 kotlownia" mac-address=34:B4:72:4E:17:34 server=dhcp_IoT
    add address=192.168.10.12 comment="Swiatlo w sypialni" mac-address=\
        AC:CF:23:59:4D:7C server=dhcp_IoT
    add address=192.168.10.30 comment="Oswietlenie akwarium ESP32" mac-address=\
        50:02:91:1A:E0:F2 server=dhcp_IoT
    add address=192.168.10.10 comment=Pogodynka mac-address=AC:CF:23:59:67:94 \
        server=dhcp_IoT
    add address=192.168.10.40 comment="Oczyszczacz powietrza" mac-address=\
        50:EC:50:7D:EF:E3 server=dhcp_IoT
    add address=192.168.10.14 comment="Zegar w sypialni" mac-address=\
        F0:FE:6B:28:10:2A server=dhcp_IoT
    /ip dhcp-server network
    add address=192.168.2.0/24 dns-server=192.168.2.70,192.168.2.71,192.168.2.72 \
        gateway=192.168.2.1 netmask=24
    add address=192.168.10.0/24 dns-server=192.168.2.70,192.168.2.71,192.168.2.72 \
        gateway=192.168.10.1 netmask=24
    add address=192.168.20.0/24 dns-server=192.168.2.70,192.168.2.71,192.168.2.72 \
        gateway=192.168.20.1 netmask=24
    /ip dns
    set servers=192.168.2.70,192.168.2.71,192.168.2.72
    /ip firewall address-list
    add address=192.168.2.70-192.168.2.72 list=Local_DNS
    /ip firewall nat
    add action=masquerade chain=srcnat comment="fix the ntp client by changing its\
        \_source port 123 with something higher (mikrotik forum 794718)" \
        protocol=udp src-port=123 to-ports=12400-12440
    add action=masquerade chain=srcnat comment="NTP NAT masquerade " disabled=yes \
        dst-port=123 protocol=udp to-ports=12300-12390
    /ip hotspot profile
    set [ find default=yes ] html-directory=hotspot
    /ip service
    set telnet disabled=yes
    set www disabled=yes
    set www-ssl certificate=Mikrotik_test disabled=no tls-version=only-1.2
    set api disabled=yes
    /ip ssh
    set host-key-size=4096 host-key-type=ed25519 strong-crypto=yes
    /snmp
    set contact=Wachcio enabled=yes location=Rypin trap-generators=start-trap \
        trap-interfaces=all trap-version=3
    /system clock
    set time-zone-name=Europe/Warsaw
    /system identity
    set name=MikroTik_CRS326
    /system logging
    add action=syslogNG topics=info
    add action=syslogNG topics=error
    add action=syslogNG topics=warning
    add action=syslogNG topics=critical
    add action=syslogNG topics=e-mail
    add action=syslogNG topics=system
    add action=syslogNG topics=account
    add action=syslogNG topics=async
    add action=syslogNG topics=bridge
    add action=syslogNG topics=backup
    add action=syslogNG topics=dhcp
    add action=syslogNG topics=dns
    add action=syslogNG topics=fetch
    add action=syslogNG topics=firewall
    add action=syslogNG topics=health
    add action=syslogNG topics=interface
    add action=syslogNG topics=manager
    add action=syslogNG topics=mqtt
    add action=syslogNG topics=ntp
    add action=syslogNG topics=pppoe
    add action=syslogNG topics=route
    add action=syslogNG topics=script
    add action=syslogNG disabled=yes topics=snmp
    add action=syslogNG topics=ssh
    add action=syslogNG topics=timer
    add action=syslogNG topics=wireless
    /system note
    set show-at-login=no
    /system ntp client
    set enabled=yes
    /system ntp server
    set broadcast=yes broadcast-addresses=0.0.0.0 enabled=yes manycast=yes \
        multicast=yes use-local-clock=yes
    /system ntp client servers
    add address=zegar.umk.pl
    add address=ntp.task.gda.pl
    add address=vega.cbk.poznan.pl
    add address=ntp.itl.waw.pl
    add address=ntp.elpromaelectronics.com
    add address=tempus1.gum.gov.pl
    add address=tempus2.gum.gov.pl
    /system routerboard settings
    set boot-os=router-os enter-setup-on=delete-key
    /system scheduler
    add interval=1d name="Backup to email" on-event="{\r\
        \n:log info \"Script backup configuration and send email\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n:local subject \"[BACKUP] MikroTik \$[/system identity get name] backup \
        configuration \$date\"; \r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/tool e-mail send file=\$files to=\"home-network@wachcio.pl\" subject=\"\
        \$subject\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n" policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-03-31 start-time=02:00:00
    add interval=1d name="Backup to TrueNAS" on-event="{\r\
        \n# Config\r\
        \n :local server \"192.168.2.5\";\r\
        \n :local username \"mikrotik\";\r\
        \n :local password \"xxxxxxxx\";\r\
        \n:log info \"Script backup configuration and send ftpl\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 2s;\r\
        \n\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameBackup\" dst-path=\"/Backup config/\$filenameBac\
        kup\" address=\"\$server\";\r\
        \n:delay 2s;\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameExport\" dst-path=\"/Backup config/\$filenameExp\
        ort\" address=\"\$server\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n" policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        start-date=2024-04-06 start-time=01:50:00
    /system script
    add dont-require-permissions=no name=email-backup-export owner=wachcio \
        policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
        source="{\r\
        \n:log info \"Script backup configuration and send email\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n:local subject \"[BACKUP] MikroTik \$[/system identity get name] backup \
        configuration \$date\"; \r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/tool e-mail send file=\$files to=\"home-network@wachcio.pl\" subject=\"\
        \$subject\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    add dont-require-permissions=no name=ftp-backup-export owner=wachcio policy=\
        ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="{\
        \r\
        \n# Config\r\
        \n :local server \"192.168.2.5\";\r\
        \n :local username \"mikrotik\";\r\
        \n :local password \"xxxxxxxxx\";\r\
        \n:log info \"Script backup configuration and send ftpl\";\r\
        \n\r\
        \n# Set Filename variables. Do not change this unless you want to edit the\
        \_format of the filename.\r\
        \n\r\
        \n:local date  [/system clock get date];\r\
        \n:local time  [/system clock get time];\r\
        \n# Replace \":\" with \"_\" in time to avoid issues with file naming conv\
        entions.\r\
        \n:local safeTime ([:pick \$time 0 2] . \"_\" . [:pick \$time 3 5] . \"_\"\
        \_. [:pick \$time 6 8]);\r\
        \n:local filename \"\$[/system identity get name]_\$date_\$safeTime\";\r\
        \n:local filenameBackup (\$filename.\".backup\");\r\
        \n:local filenameExport (\$filename.\".rsc\");\r\
        \n:local files (\$filenameBackup.\",\".\$filenameExport);\r\
        \n\r\
        \n# Create backup file and export the config.\r\
        \n\r\
        \n:log info \"Create backup file and export the config.\";\r\
        \n\r\
        \nexport compact file=\"\$filename\";\r\
        \n/system backup save name=\"\$filename\";\r\
        \n\r\
        \n:log info \"File: \$filenameBackup\";\r\
        \n:log info \"File: \$filenameExport\";\r\
        \n:log info \"Backup Created Successfully\";\r\
        \n\r\
        \n:delay 2s;\r\
        \n\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameBackup\" dst-path=\"/Backup config/\$filenameBac\
        kup\" address=\"\$server\";\r\
        \n:delay 2s;\r\
        \n /tool fetch mode=ftp upload=yes user=\"\$username\" password=\"\$passwo\
        rd\" src-path=\"\$filenameExport\" dst-path=\"/Backup config/\$filenameExp\
        ort\" address=\"\$server\";\r\
        \n\r\
        \n:delay 5s;\r\
        \n\r\
        \n/file remove \$filenameBackup;\r\
        \n/file remove \$filenameExport;\r\
        \n:log info \"backup script finished\";\r\
        \n}\r\
        \n"
    /tool e-mail
    set from=<admin@wachcio.pl> port=465 server=wachcio.atthost24.pl tls=yes \
        user=admin@wachcio.pl
    /tool mac-server
    set allowed-interface-list=LAN
    /tool mac-server mac-winbox
    set allowed-interface-list=LAN
    


    Miałem problem, żeby to wysłąć ze względu na rozmiar dlatego podzielone

    Dodano po 5 [minuty]:

    Ja rozumiem, że jeśli VLAN filtering jest włączony to ruch między VLAN-ami jest możliwy jak by była to jedna podsieć lub ruch był routowany
  • #15 21174213
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    OK, widzę że na routerze :
    1) zdefiniowano 3 VLANy : 10,20 oraz 100 - linie 15 do 18 w 1 pliku

    2) na interfejsie wifi - przepuszczono (tagowane) VLANy 10 i 20 - reszta ruchu nietagowanego ... (?)
    - linie 46 - 49

    3)na interface "bridge" (glupia nazwa dla interfejsu, albo kompletnie nie rozumiem tu składni Mikrotika :P :D )
    - puszczono VLANy 10,20 i 100 (ale ten ostatni jest wyłłączony ?... hmm )
    - linie 144 -147

    4) w definicji adresacji IP ( /ip address :
    - zdefiniowano dla int. "bridge" sieć o adresacji 192.168.2.0/24 i adresie 192.168.2.1 (bez tagowania, czyli pewnie to kazdy powzostały ruch ...)
    - zdefiniowano dla vlanu 10 sieć o adresacji 192.168.10.0/24 i adresie 192.168.10.1
    - zdefiniowano dla vlanu 20 sieć o adresacji 192.168.20.0/24 i adresie 192.168.20.1
    - zdefiniowano dla vlanu 100 sieć o adresacji 192.168.100.0/24 i adresie 192.168.100.1
    - linie 174 - 179

    5) w liniach 12-14 ustawiono trasę domyślną - na zewnątrz sieci :
    "
    /interface pppoe-client
    add add-default-route=yes disabled=no interface=ether5_WAN name=pppoe-out1 \
    use-peer-dns=yes user=XXXXXXXXXX
    "

    i to w zasadzie tyle ... co tutaj widzę odnośnie vlanów , routingu między nimi itp
    (innych informacji np. o zakresach na wifi m cy regułach FW itp itd) nie brałem pod uwagę .

    Pozostaje pytanie - ale to do Kolegów lepiej znających skłądnię Mikrotika - gdzie w zasadzie konfiguruje się routing między vlan'ami ?
    Jak wygląda ta składnia ? ... bo tutaj , no nie wiem sam czego szukąć :) (na Cisco /Extreme Networks / Dlinku /Zyxelu czy innym podobnym sprzecie bym raczej wiedział .. :P)

    // jednak to co ludzie z reguły mówią ('że mietki mają pokręconą tą składnię w CLI - to rzeczywiście prawda" :P :) )

    Dodano po 4 [minuty]:

    wachcio napisał:
    Ja rozumiem, że jeśli VLAN filtering jest włączony to ruch między VLAN-ami jest możliwy jak by była to jedna podsieć lub ruch był routowany


    No , tego to ja wcale nie jestem pewien , choć , jak piszę - nie robiłem nigdy "doktoratu z Mikrotików" :P - ale znam ogólne zasady i takiego routingu (Inter-vlan ) ale nie wiem jak tutaj to konkretnie powinno wyglądać . W sensie komend CLI (by Mietek) - bo w innych rozwiązaniach to 'raczej tak' :) Rzecz generalnie sprowadza się do zrobienia na interfejsie trunkowym ze switcha do routera tylu podinterfejsów virtualnych (z enkapsulacją dot1Q) ile mamy VLANów ... no i routing między nimi - który najczęściej już sobie działa (bo patrz np. w Cisco - są traktowane jako "directly connected" .
  • #16 21174245
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Ja dopiero zaczynam poznawać głębiej w sieci robiąc właśnie CCNA co zresztą kolega @markooff dobrze wie.
    Adresacja 192.168.2.0/24 była już w mojej sieci. Na razie zająłem się VLAN-em dla IoT i dla gości zostawiając na razie VLAN 100 do zarządzania. Dopiero się uczę i dlatego między innymi wybrałem Mikrotik gdyż może i inaczej ale tutaj można robić cuda wręcz jak się wie jak. Jak brak jakiś funkcji to są jeszcze skrypty
  • #17 21174252
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    Nie no , żeby nie było - mam całkiem duży szacunek - dla firmy Mikrotik !
    Tylko że jej składnia - mnie jakoś nigdy nie przekonała tak żeby się jej nauczyć :P
    Ale - tak czy inaczej - problem jest do rozwiązania z pewnością ! :)


    Niestety sorry - ale muszę również poczekać na Kolegów lepiej znających problematykę Mikrotika - bo chyba nie wymyślę sam :) jak to się tam robi (jakich komend należy uzyć)
  • #18 21174314
    Konto nie istnieje
    Poziom 1  
  • #19 21174343
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    Erbit napisał:
    odnoszę wrażenie (nie przyglądałem się szczegółowo), że generalnie "brakuje wszystkiego":
    - adresów IP przypiętych do VLAN


    Wiesz, akurat to to chyba znalazłem :) :
    (w liniach 174 co 179 )
    Zrzut ekranu z konfiguracją adresów IP w CLI.

    Ale wiele innych rzeczy - no , nie bardzo rozumiem , jak tam ma działać ....

    Ale kładę to na karb mojej słabej znojomości Mietkowego CLI (składni) .

    Jak dla mnie brakuje tam na routerze przede wszystkim virtualnych interfejsów (dot1q) na porcie z połączeniem ze switcha -> do routera - - które by mogły realizować inter-vlan routing i scenariusz "routera na patyku" . A potem mozna by dodawać ręcznie reguły (ACLki) do FW ... Ale - może się nie znam :P
  • #20 21174485
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Erbit napisał:
    W routerze.

    Generalnie VLAN (interface wirtualny) musisz traktować jak każdy inny interface. Zatem np. brakuje przypisania VLANów do listy intefejsów "LAN"

    
    /interface list member
    


    Po drugie - odnoszę wrażenie (nie przyglądałem się szczegółowo), że generalnie "brakuje wszystkiego":
    - adresów IP przypiętych do VLAN
    - serwerów DHCP

    ... i pewno innych ustawień takich jak masz dla Eth.


    [wachcio@MikroTikAX3_salon] /interface/list/member> print
    Columns: LIST, INTERFACE
    # LIST  INTERFACE 
    ;;; defconf
    0 LAN   bridge    
    ;;; defconf
    1 WAN   ether5_WAN
    2 WAN   *9        
    3 WAN   pppoe-out1


    To nie jest przypisanie do LAN?
    [wachcio@MikroTikAX3_salon] /interface/vlan> print
    Flags: X - DISABLED, R - RUNNING
    Columns: NAME, MTU, ARP, VLAN-ID, INTERFACE
    #   NAME           MTU  ARP      VLAN-ID  INTERFACE
    0 R vlan10_IoT    1500  enabled       10  bridge   
    1 R vlan20_gosc   1500  enabled       20  bridge   
    2 X vlan100_mgmt  1500  enabled      100  bridge


    [wachcio@MikroTikAX3_salon] /ip/address> print
    Flags: I - INVALID, D - DYNAMIC
    Columns: ADDRESS, NETWORK, INTERFACE
    #   ADDRESS           NETWORK        INTERFACE   
    ;;; defconf
    0   192.168.2.1/24    192.168.2.0    bridge      
    1   192.168.10.1/24   192.168.10.0   vlan10_IoT  
    2   192.168.20.1/24   192.168.20.0   vlan20_gosc 
    3 I 192.168.100.1/24  192.168.100.0  vlan100_mgmt
    4 D 46.238.111.111/32  10.104.0.1     pppoe-out1 


    Serwer DHCP jest na switchu.
    [wachcio@MikroTik_CRS326] /ip/dhcp-server> print
    Flags: I - INVALID
    Columns: NAME, INTERFACE, ADDRESS-POOL, LEASE-TIME
    #   NAME       INTERFACE     ADDRESS-POOL    LEASE-TIME
    0   dhcp_dom   bridge        dhcp_pool_dom   2m        
    1   dhcp_IoT   vlan10_IoT    dhcp_pool_IoT   2m        
    2   dhcp_gosc  vlan20_gosc   dhcp_pool_gosc  2m        
    3 I dhcp_mgmt  vlan100_mgmt  dhcp_pool_mgmt  2m 


    [wachcio@MikroTik_CRS326] /ip/pool> print
    Columns: NAME, RANGES
    #  NAME            RANGES                         
    0  dhcp_pool_dom   192.168.2.200-192.168.2.240    
    1  dhcp_pool_IoT   192.168.10.200-192.168.10.240  
    2  dhcp_pool_gosc  192.168.20.200-192.168.20.240  
    3  dhcp_pool_mgmt  192.168.100.200-192.168.100.240
  • #21 21174543
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    OK, w /na tych listingach - to wygląda już znacznie lepiej .
    (nadal nie moge ścierpieć tej nazwy "bridge" na interfejsie LAN , ale co tam ... :) )

    Teraz trzeba by wytestować, spokojnie punk po punkcie - CO istotnie działa - i dochodząc do tego co nie.

    Po 1) sprawdziłbym czy z poziomu routera (Mikrotika) - widzę komputery w kazdej z podsieci (w kazdym VLANie)
    (powinny być widoczne bo interfejsy oraz same vlany wygląda że są skonfigurowane OK)
    2) jeśli tak, to sprawdziłbym coś takiego jak tablicę routingu. Jak ona wygląda ....?
    Po czym
    3) sprawdziłbym widoczność komputerów w innych VLANach z komputerów w jednym z nich. I tak przetestował - po kolei kazdy vlan.

    4_ konfiguracja serwerów dhcpd - wygląda również na OK - przy czym nie widzę tutaj żadnych opcji zaawansowanych , tylko same definicje pul . Ale jeśli reszta jest ok - to powinny one działać. Zresztą Kolega @wachcio - zobaczy to - próbując testować widoczność komputerów winnych vlan'ach. Jeśłi jakiś nie dostanie poprawnej konfiguracji, z dhcpd to trzeba będzie sprawdzić - dlaczego .

    Na razie tyle "cudownych pomysłów" :) :P
  • #22 21174659
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    markooff napisał:
    Zresztą Kolega @wachcio - zobaczy to - próbując testować widoczność komputerów winnych vlan'ach.

    Testy ciężko idą bo po włączeniu "VLAN filtering" mnie odcięło i reset routera do fabryki o północy :)
  • #23 21174955
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    wachcio napisał:
    Testy ciężko idą bo po włączeniu "VLAN filtering" mnie odcięło i reset routera do fabryki o północy

    Ale to - taka sytuacja - też coś mówi.
    Np. to że najprawdopodobniej błędy/problemy są (jakieś..) w samych ustawieniach tego "VLAN Filteringu" ,
    warto byłoby spróbować przywrócić powyższą konfigurację - BEz właczania tegoż filteringu - i sprawdzić w pierwszym kroku sam routing między vlan-ami . A potem bym dokładał dopiero w kolejnych etapach reguły filtrujące ten ruch ...
  • #24 21175012
    Damian_Max
    Poziom 21  
    Posty: 395
    Pomógł: 40
    Ocena: 96
    (obserwuję ten temat, bo też bym chciał coś takiego i pomału zbieram wiedzę i chęci xD)

    @wachcio W mikrotikach masz safe mode: https://mikrotikacademy.pl/safe-mode-tryb-bezpieczny-winbox/
    Ludzie to polecają przy konfiguracji właśnie firewall.
    Włączasz to, następnie wprowadzasz zmiany w konfiguracji i jak Cię wyrzuci, to wszystkie zmiany od włączenia tego mode zostaną wycofane i tylko te zmiany. A jak Ci się uda coś skonfigurować to musisz pamiętać by wyłączyć ten mode, by zmiany zapisały się trwale.
  • #25 21175033
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Damian_Max napisał:
    (obserwuję ten temat, bo też bym chciał coś takiego i pomału zbieram wiedzę i chęci xD)

    @wachcio W mikrotikach masz safe mode: https://mikrotikacademy.pl/safe-mode-tryb-bezpieczny-winbox/
    Ludzie to polecają przy konfiguracji właśnie firewall.
    Włączasz to, następnie wprowadzasz zmiany w konfiguracji i jak Cię wyrzuci, to wszystkie zmiany od włączenia tego mode zostaną wycofane i tylko te zmiany. A jak Ci się uda coś skonfigurować to musisz pamiętać by wyłączyć ten mode, by zmiany zapisały się trwale.

    Zapomniałem, że coś takiego tak jest. Dzięki.
    Na każdym moim urządzeniu ustawiłem teraz jeden port który jest pod inny bridge oraz ma ustawiony dla niego DHCP. Jak coś ostro nabroję przy VLAN-ach podepnę kabelek pod port i mam nadzieję, że obędzie się bez resetu
  • #26 21175047
    markooff
    Poziom 26  
    Posty: 719
    Pomógł: 79
    Ocena: 178
    wachcio napisał:
    Na każdym moim urządzeniu ustawiłem teraz jeden port który jest pod inny bridge

    zaraz .... czyli znaczy że to Kolega ustawił sobie te bridge - jako fizyczne bridge pomiędzy interfejsami ??
    To w takim razie - żaden inter-vlan routing tu nie zadziała , bo sefmenty sieci które są bridge'owane - nie podlegają routingowi wcale !
    Ale też (jeśli w grę wchodzi tutaj klasyczne pojęcie bridge'owania interfejsów) to nie bardzo jest to rozwiązanie - w każdym razie nie mające wiele wspólnego z bezpieczeństwem czy komunikacją , bo bridge (z definicji) pozbawia Cię logicznej kontroli nad ruchem który przez niego przechodzi.... To 'fizyczne' połączenie ze sobą różnych podsieci - więc po 1) jak ma komputer z adresacją np. 192.168.1.x/24 rozmawiać z komputerem o adresacji 192.168.19.x/24 - na poziomie IP ?? Bez routingu ?? przecież te pakiety 'się po prostu miną' bez komunikacji :)
  • #27 21175071
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    >>21175047
    Jeżeli dobrze rozumiem podejście Mikrotik to 'bridge' dla nich oznacza połączone logicznie ze sobą porty. Można w ten sposób uzyskać kilka niezależnych przełączników w jednym urządzeniu. Pomiędzy nimi nie będzie komunikacji. Dlatego też wczoraj po zabawie z przywracaniem do fabrycznych ustawień i wgrywaniem na nowo konfiguracji wydzieliłem jeden port na innym bridgu z oddzielnym serwerem DHCP. Mam nadzieję, że przy następnym fackupie podłączę się do niego i zmienię konfigurację
  • #28 21178076
    wachcio
    Poziom 24  
    Posty: 1045
    Pomógł: 61
    Ocena: 73
    Nie potrafię zrozumieć jak działa u nich ten "VLAN Filtering". Po włączeniu odcina mnie przeważnie. Jeśli nawet nie odetnie to nie mam w VLAN-ach dostępu do DNS-ów które to są w adresacji 192.168.2.0/24. Ustawianie reguł na firewall nie przynosi efektów. Coś źle robię tylko nie wiem co...
    Na razie "na piechotę" zablokowałem routing między VLAN-ami na firewall-u (bez VLAN filtering) i odblokowałem dostęp do tego co potrzebuję (głównie z VLAN IoT do "podstawowej podsieci 192.168.2.0/24)" np. DNS, NTP, dostęp niektórych IoT do serwera MQTT czy dostęp z adresacji 192.168.2.0/24 do VLAN IoT

Podsumowanie tematu

✨ Użytkownik wdraża VLAN-y na urządzeniach Mikrotik w swojej sieci domowej i napotyka problemy z dostępem do serwerów DNS oraz komunikacją między VLAN-ami. Dyskutanci sugerują użycie list adresowych w regułach firewall, aby umożliwić ruch między VLAN-ami, a także zwracają uwagę na konieczność poprawnej konfiguracji VLAN filtering. Użytkownik posiada switch Mikrotik CRS326 oraz router MT AX3, a także korzysta z kontenerów Docker i LXC. Problemy z dostępem do DNS-ów oraz z routingiem między VLAN-ami są głównymi tematami dyskusji, a użytkownik planuje testować różne konfiguracje, aby rozwiązać te problemy.
Wygenerowane przez model językowy.
REKLAMA