/export
# 2025-06-13 10:22:34 by RouterOS 7.19.1
# software id = XGXR-89RQ
#
# model = RB4011iGS+
# serial number = HFA098M27CH
/interface bridge
add comment="BRIDGE LAN GIADA" name=brGiada
add comment="BRIDGE LAN" name=brLAN port-cost-mode=short
add comment="BRIDGE WIFI OSPITI" name=brOspiti
add comment="BRIDGE WAN" name=brWAN
/interface ethernet
set [ find default-name=ether1 ] comment="ETH 1 - WAN - FWA VODAFONE"
set [ find default-name=ether2 ] comment="ETH 2 - WAN - VOIP"
set [ find default-name=ether3 ] comment="ETH 3 - LAN"
set [ find default-name=ether4 ] comment="ETH 4 - LAN"
set [ find default-name=ether5 ] comment="ETH 5 - LAN"
set [ find default-name=ether6 ] comment="ETH 6 - LAN"
set [ find default-name=ether7 ] comment="ETH 7 - LAN"
set [ find default-name=ether8 ] comment="ETH 8 - LAN"
set [ find default-name=ether9 ] comment="ETH 9 - LAN"
set [ find default-name=ether10 ] comment="ETH 10 - LAN"
/interface wireguard
add listen-port=13232 mtu=1420 name=wireguard1
/interface vlan
add comment="VLAN 1038 DATI VODAFONE FWA" interface=brWAN name=vlan1038-dati vlan-id=1038
/caps-man configuration
add channel.frequency=2432,2447,2467 comment="WIFI 2.4 GHZ CASA - SSID=AriSte PASSWORD=12456789" country=\
italy datapath.bridge=brLAN .client-to-client-forwarding=yes mode=ap name=wifiCasa-2.4 \
security.authentication-types=wpa-psk,wpa2-psk .encryption=aes-ccm,tkip ssid=AriSte
add comment="WIFI 2.4 GHZ OSPITI - SSID=AriSte-Guest PASSWORD=12456789" country=italy datapath.bridge=\
brOspiti .client-to-client-forwarding=no mode=ap name=wifiOspiti-2.4 security.authentication-types=\
wpa-psk,wpa2-psk .encryption=aes-ccm,tkip ssid=AriSte-Guest
add channel.frequency=5180,5240,5300,5500,5560,5620,5680 comment=\
"WIFI 5 GHZ CASA - SSID=AriSte-5G PASSWORD=12456789" country=italy datapath.bridge=brLAN \
.client-to-client-forwarding=yes mode=ap name=wifiCasa-5 security.authentication-types=wpa-psk,wpa2-psk \
.encryption=aes-ccm,tkip ssid=AriSte-5G
add comment="WIFI 5 GHZ GIADA - SSID=Giada-5G PASSWORD=12456789" country=italy datapath.bridge=brGiada \
.client-to-client-forwarding=yes mode=ap name=wifiGiada-5 security.authentication-types=wpa-psk,wpa2-psk \
.encryption=aes-ccm,tkip ssid=G-5G
add channel.frequency=2432,2447,2467 comment="WIFI 2.4 GHZ INTERNA - SSID=Giada-2.4G PASSWORD=12456789" \
country=italy datapath.bridge=brGiada .client-to-client-forwarding=yes mode=ap name=wifiGiada2.4 \
security.authentication-types=wpa-psk,wpa2-psk .encryption=aes-ccm,tkip ssid=G-2.4G
/interface list
add name=WAN
add name=LAN
add name=OSPITI
add name=Wg1
add name=LAN_GIADA
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add comment="POOL DHCP LAN" name=poolDhcpLan ranges=192.168.9.100-192.168.9.199
add comment="POOL DHCP WIFI OSPITI" name=poolDhcpOspiti ranges=172.20.1.100-172.20.1.199
add comment="POOL DHCP Dispositivi IoT" name=poolDhcpIoT ranges=192.168.9.201-192.168.9.250
add comment="POOL DHCP LAN GIADA" name=poolDhcpGiada ranges=192.168.10.100-192.168.10.199
/ip dhcp-server
add address-pool=poolDhcpLan authoritative=after-2sec-delay comment="DHCP RETE LAN" interface=brLAN lease-time=4h \
name=dhcpLan
add address-pool=poolDhcpOspiti comment="DHCP WIFI OSPITI" interface=brOspiti name=dhcpWifiOspiti
add address-pool=poolDhcpGiada authoritative=after-2sec-delay comment="DHCP LAN GIADA" interface=brGiada \
lease-time=2h name=dhcpLanGiada
/port
set 0 name=serial0
set 1 name=serial1
/queue simple
add comment="LIMITE WIFI OSPITI 50M / 20M" max-limit=50M/20M name=queueWifiOspiti target=brOspiti
/system logging action
set 0 memory-lines=10000
/caps-man manager
set ca-certificate=CACapsman certificate=CertCapsman enabled=yes
/caps-man manager interface
set [ find default=yes ] forbid=yes
add disabled=no interface=brLAN
add disabled=no interface=brGiada
/caps-man provisioning
add action=create-dynamic-enabled comment="PROVISIONING WIFI 2.4 GHZ" hw-supported-modes=gn master-configuration=\
wifiCasa-2.4 name-format=identity slave-configurations=wifiOspiti-2.4,wifiGiada2.4
add action=create-dynamic-enabled comment="PROVISIONING WIFI 5 GHZ" hw-supported-modes=ac master-configuration=\
wifiCasa-5 name-format=identity slave-configurations=wifiGiada-5
add action=create-dynamic-enabled comment="PROVISIONING WIFI-GIADA 2.4 GHZ" disabled=yes hw-supported-modes=gn \
master-configuration=wifiGiada2.4 name-format=identity
add action=create-dynamic-enabled comment="PROVISIONING WIFI-GIADA 5 GHZ" disabled=yes hw-supported-modes=ac \
master-configuration=wifiGiada-5 name-format=identity
/certificate settings
set builtin-trust-anchors=not-trusted
/interface bridge port
add bridge=brWAN comment="WAN FWA VODAFONE" interface=ether1
add bridge=brWAN comment="VOIP\?" interface=ether2
add bridge=brLAN comment=LAN interface=ether3
add bridge=brLAN interface=ether4
add bridge=brLAN interface=ether5
add bridge=brLAN interface=ether6
add bridge=brLAN interface=ether7
add bridge=brLAN interface=ether8
add bridge=brLAN interface=ether9
add bridge=brLAN interface=ether10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/interface list member
add interface=brLAN list=LAN
add interface=brWAN list=WAN
add interface=vlan1038-dati list=WAN
add interface=brOspiti list=OSPITI
add interface=wireguard1 list=Wg1
add interface=brGiada list=LAN_GIADA
/interface ovpn-server server
add mac-address=FE:01:A5:80:76:81 name=ovpn-server1
/interface wireguard peers
add allowed-address=10.10.10.2/32,192.168.0.0/24,192.168.9.0/24,192.168.2.0/24,192.168.15.0/24 comment=\
"PC Lavoro Ste" endpoint-address=128.116.170.155 endpoint-port=13232 interface=wireguard1 name=StePC \
persistent-keepalive=25s public-key="GJcFbDDq6weLughCCn1WmSe4/aYlDZ5KLldWhyx2gGQ="
add allowed-address=10.10.10.3/32,192.168.9.0/24 comment="S23 Ste " endpoint-port=13232 interface=wireguard1 name=\
WgS23Ste persistent-keepalive=25s public-key="M02YwhGC7/ZsKPGO+uc2lI6NCa9S55MLHLHs9oTmjDw="
/ip address
add address=192.168.9.1/24 comment="IP LAN" interface=brLAN network=192.168.9.0
add address=172.20.1.1/24 comment="IP WIFI OSPITI" interface=brOspiti network=172.20.1.0
add address=10.10.10.1/24 comment=Wireguard interface=wireguard1 network=10.10.10.0
add address=192.168.10.1/24 comment="IP LAN GIADA" interface=brGiada network=192.168.10.0
/ip cloud
set ddns-enabled=yes ddns-update-interval=2h
/ip dhcp-client
add comment="DHCP CLIENT DA FWA VODAFONE" default-route-distance=5 interface=vlan1038-dati
/ip dhcp-server lease
add address=192.168.9.149 client-id=1:bc:24:11:8c:a4:64 mac-address=BC:24:11:8C:A4:64 server=dhcpLan
add address=192.168.9.195 client-id=1:2:66:46:2d:df:bb mac-address=02:66:46:2D:DF:BB server=dhcpLan
/ip dhcp-server network
add address=172.20.1.0/24 comment="NET WIFI OSPITI" dns-server=172.20.1.1 gateway=172.20.1.1 ntp-server=172.20.1.1
add address=192.168.9.0/24 comment="DHCP RETE LAN" dns-server=192.168.9.1 gateway=192.168.9.1 ntp-server=\
192.168.9.1
add address=192.168.10.0/24 comment="DHCP LAN GIADA" dns-server=192.168.10.1 gateway=192.168.10.1 ntp-server=\
192.168.10.1
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,8.8.8.8,9.9.9.9
/ip firewall address-list
add address=192.168.9.0/24 list=NetLan
add address=192.168.0.0/16 list=NetPrivateLan
add address=10.0.0.0/8 list=NetPrivateLan
add address=172.16.0.0/12 list=NetPrivateLan
add address=100.64.0.0/10 list=NetPrivateLan
add address=172.20.1.0/24 list=NetWifiOspiti
add address=192.168.0.176 list=HostPcLavoro
add address=192.168.10.0/24 list=NetLanGiada
/ip firewall filter
add action=fasttrack-connection chain=forward comment="FWD - fasttrack - established,related" connection-state=\
established,related hw-offload=yes
add action=accept chain=forward comment="FWD - ACCETTA - established,related" connection-state=established,related
add action=accept chain=input comment="IN - ACCETTA established, related" connection-state=established,related
add action=accept chain=input comment="IN - ACCETTA ICMP" protocol=icmp
add action=accept chain=input comment="IN - ACCETTA LAN -> DNS" dst-port=53 in-interface-list=LAN protocol=udp
add action=accept chain=input comment="IN - ACCETTA LAN -> NTP" dst-port=123 in-interface-list=LAN protocol=udp
add action=accept chain=input comment="IN - ACCETTA LAN -> WINBOX 8291 " dst-port=8291 in-interface-list=LAN \
protocol=tcp
add action=accept chain=input comment="IN - ACCETTA LAN -> SSH 22 " dst-port=22 in-interface-list=LAN protocol=tcp
add action=accept chain=input comment="IN - ACCETTA PORTA WIREGUARD" dst-port=13232 protocol=udp
add action=accept chain=input comment="IN - ACCETTA LAN GIADA --> ICMP" in-interface-list=LAN_GIADA protocol=icmp \
src-address-list=NetLanGiada
add action=accept chain=input comment="IN - ACCETTA LAN GIADA --> DNS" dst-port=53 in-interface-list=LAN_GIADA \
protocol=udp src-address-list=NetLanGiada
add action=accept chain=input comment="IN - ACCETTA LAN GIADA --> NTP" dst-port=123 in-interface-list=LAN_GIADA \
protocol=udp src-address-list=NetLanGiada
add action=accept chain=input comment="IN - ACCEPT - WIFI-OSPITI --> ICMP" in-interface-list=OSPITI protocol=icmp \
src-address-list=NetWifiOspiti
add action=accept chain=input comment="IN - ACCEPT - WIFI-OSPITI --> DNS" dst-port=53 in-interface-list=OSPITI \
protocol=udp src-address-list=NetWifiOspiti
add action=accept chain=input comment="IN - ACCEPT - WIFI-OSPITI --> NTP" dst-port=123 in-interface-list=OSPITI \
protocol=udp src-address-list=NetWifiOspiti
add action=accept chain=input comment="IN - ACCETTA WIREGUARD" in-interface-list=Wg1
add action=drop chain=input comment="IN - DROP RESTO DELLE CONNESSIONI" log=yes log-prefix="[IN-DROP]"
add action=drop chain=forward comment="FWD - DROP invalid" connection-state=invalid
add action=accept chain=forward comment="FWD - ACCETTA - LAN -> INTERNET TRAMITE FWA VODAFONE" in-interface-list=\
LAN out-interface-list=WAN src-address-list=NetLan
add action=accept chain=forward comment="FWD - ACCEPT - LAN GIADA --> WAN" in-interface-list=LAN_GIADA \
out-interface-list=WAN src-address-list=NetLanGiada
add action=accept chain=forward comment="FWD - ACCEPT - WIFI OSPITI --> WAN" in-interface-list=OSPITI \
out-interface-list=WAN src-address-list=NetWifiOspiti
add action=accept chain=forward comment="FWD - ACCEPT - WIREGUARD --> LAN" dst-address-list=NetLan \
in-interface-list=Wg1 out-interface-list=LAN src-address-list=""
add action=drop chain=forward comment="FWD - DROP ALTRE CONNESSIONI NON NATTATE" connection-nat-state=!dstnat log=\
yes log-prefix="[FWD-DROP]"
/ip firewall nat
add action=masquerade chain=srcnat comment="SRCNAT - MASQ - NAVIGAZIONE DA LAN SU WAN FWA VODAFONE " \
out-interface-list=WAN
add action=masquerade chain=srcnat comment="SRCNAT - MASQUERADE - -----> INTERNET" out-interface-list=WAN
add action=masquerade chain=srcnat src-address=10.10.10.0/24
add action=dst-nat chain=dstnat dst-port=443 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
to-ports=443
add action=dst-nat chain=dstnat dst-port=9000 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
to-ports=9000
add action=dst-nat chain=dstnat dst-port=9003 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
to-ports=9003
add action=dst-nat chain=dstnat dst-port=9002 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
to-ports=9002
add action=dst-nat chain=dstnat dst-port=9001 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
to-ports=9001
add action=dst-nat chain=dstnat dst-port=80 in-interface-list=WAN protocol=tcp to-addresses=192.168.9.247 \
to-ports=80
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip route
add comment="ROUTE IP LAVORO TRAMITE TUNNEL WIREGUARD" disabled=no distance=1 dst-address=192.168.0.176/32 \
gateway=wireguard1 routing-table=main suppress-hw-offload=no
add disabled=no dst-address=192.168.0.0/24 gateway=wireguard1 routing-table=main suppress-hw-offload=no
/ip service
set ftp disabled=yes
set telnet disabled=yes
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip ssh
set strong-crypto=yes
/system clock
set time-zone-name=Europe/Rome
/system identity
set name=FIREWALL-MIKROTIK
/system note
set show-at-login=no
/system ntp client
set enabled=yes
/system ntp server
set enabled=yes manycast=yes
/system ntp client servers
add address=it.pool.ntp.org
add address=ntp1.inrim.it
/system routerboard settings
set enter-setup-on=delete-key
/tool bandwidth-server
set enabled=no
/tool graphing interface
add
/tool graphing resource
add