RB2011
[admin@rt-main] > /export compact
# oct/03/2014 22:05:26 by RouterOS 6.19
# software id = KXL4-KADI
#
/interface bridge
add l2mtu=1598 name=brAllVlan
add l2mtu=2290 name=brBusiness
add l2mtu=2290 name=brDMZ
add l2mtu=1598 name=brVoIP
/interface ethernet
set [ find default-name=ether7 ] comment=eth7 name=ISDN
set [ find default-name=ether1 ] comment=eth1 name=internet
set [ find default-name=ether2 ] comment=eth2 name=nas
set [ find default-name=ether5 ] comment=eth5 name=toAttic
set [ find default-name=ether3 ] comment=eth3 name=toGroundfloor
set [ find default-name=ether6 ] comment=eth6 name=toBasement
set [ find default-name=ether4 ] comment=eth4 name=to1stFloor
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n disabled=no distance=indoors hide-ssid=yes l2mtu=2290 mode=ap-bridge ssid=MikroTik-77DA6F
/ip neighbor discovery
set ISDN comment=eth7
set internet comment=eth1
set nas comment=eth2
set toAttic comment=eth5
set toGroundfloor comment=eth3
set toBasement comment=eth6
set to1stFloor comment=eth4
/interface vlan
add interface=brAllVlan l2mtu=1594 name=vlBusiness vlan-id=1000
add interface=brAllVlan l2mtu=1594 name=vlDMZ vlan-id=1004
add disabled=yes interface=brAllVlan name=vlManagement vlan-id=1002
add interface=brAllVlan l2mtu=1594 name=vlVoIP vlan-id=1001
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=profBusiness supplicant-identity="" \
wpa2-pre-shared-key=BusinessPSK
add authentication-types=wpa-psk,wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=profGuest supplicant-identity="" \
wpa-pre-shared-key=GuestPSK wpa2-pre-shared-key=GuestPSK
/interface wireless
add disabled=no l2mtu=2290 mac-address=4E:5E:0C:77:DA:70 master-interface=wlan1 name=vapBusiness security-profile=profBusiness ssid=\
"Business" wds-cost-range=0 wds-default-cost=0
add disabled=no l2mtu=2290 mac-address=4E:5E:0C:77:DA:6F master-interface=wlan1 name=vapGuest security-profile=profGuest ssid="Gast" \
wds-cost-range=0 wds-default-cost=0
/ip pool
add name=poolVoIP ranges=192.168.127.65-192.168.127.125
add name=poolDMZ ranges=192.168.255.129-192.168.255.253
add name=poolMgmt ranges=192.168.127.129-192.168.127.189
add name=poolBusiness ranges=192.168.127.1-192.168.127.61
add name=vpnPool ranges=192.168.127.193-192.168.127.254
/ip dhcp-server
add address-pool=poolVoIP disabled=no interface=brVoIP lease-time=20h name=dhcpVoIP
add address-pool=poolDMZ disabled=no interface=brDMZ lease-time=1h name=dhcpDMZ
add address-pool=poolMgmt disabled=no interface=brAllVlan lease-time=8h name=dhcpManagement
add address-pool=poolBusiness disabled=no interface=brBusiness lease-time=20h name=dhcpBusiness
/port
set 0 name=serial0
/ppp profile
set 0 comment="do not touch -- ISP pppoe dial-in profile"
set 1 local-address=vpnPool remote-address=vpnPool
/interface pppoe-client
add ac-name=BERR75-se800-B2244460703306 add-default-route=yes allow=pap,chap default-route-distance=1 dial-on-demand=yes disabled=no interface=\
internet keepalive-timeout=60 max-mru=1480 max-mtu=1480 mrru=disabled name=pppoe-ISP password=12345678 profile=default service-name="" \
use-peer-dns=yes user=user@isp.tld
/system logging action
set 1 disk-lines-per-file=300
add disk-lines-per-file=300 name=FirewallDrops target=disk
/interface bridge port
add bridge=brAllVlan interface=toAttic
add bridge=brAllVlan interface=to1stFloor
add bridge=brAllVlan interface=toGroundfloor
add bridge=brVoIP interface=ISDN
add bridge=brAllVlan interface=ether8
add bridge=brAllVlan interface=ether9
add bridge=brBusiness interface=vapBusiness
add bridge=brBusiness interface=vlBusiness
add bridge=brDMZ interface=vapGuest
add bridge=brDMZ interface=vlDMZ
add bridge=brVoIP interface=vlVoIP
add bridge=brAllVlan interface=toBasement
/interface bridge settings
set use-ip-firewall=yes use-ip-firewall-for-vlan=yes
/interface l2tp-server server
set enabled=yes ipsec-secret="ipsecPSK" use-ipsec=yes
/ip address
add address=192.168.127.62/26 interface=brBusiness network=192.168.127.0
add address=192.168.127.126/26 interface=brVoIP network=192.168.127.64
add address=192.168.255.254/25 interface=brDMZ network=192.168.255.128
add address=192.168.127.190/26 comment="Management network" interface=brAllVlan network=192.168.127.128
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid interface=internet
/ip dhcp-server lease
add address=192.168.127.125 mac-address=D8:DF:0D:00:19:A7 server=dhcpVoIP
add address=192.168.127.61 client-id=1:0:11:32:2c:fe:b7 mac-address=00:11:32:2C:FE:B7 server=dhcpBusiness
/ip dhcp-server network
add address=192.168.127.0/26 dns-server=192.168.127.62,8.8.8.8 gateway=192.168.127.62
add address=192.168.127.64/26 dns-server=192.168.127.126,8.8.8.8 gateway=192.168.127.126
add address=192.168.127.128/26 dns-server=192.168.127.190,8.8.8.8 gateway=192.168.127.190
add address=192.168.255.128/25 dns-server=8.8.8.8,8.8.4.4 gateway=192.168.255.254
/ip dns
set allow-remote-requests=yes servers=8.8.8.8
/ip firewall filter
add action=add-src-to-address-list address-list=knock address-list-timeout=15s chain=input dst-port=2014 protocol=tcp
add action=add-src-to-address-list address-list=safe address-list-timeout=15m chain=input dst-port=4102 protocol=tcp src-address-list=knock
add chain=input comment="accept established connection packets" connection-state=established
add chain=input comment="accept related connection packets" connection-state=related
add action=drop chain=input comment="drop invalid packets" connection-state=invalid
add chain=input comment="Allow access to router from known network" src-address-list=safe
add action=drop chain=input comment="detect and drop port scan connections" protocol=tcp psd=21,3s,3,1
add action=tarpit chain=input comment="suppress DoS attack" connection-limit=3,32 protocol=tcp src-address-list=black_list
add action=add-src-to-address-list address-list=black_list address-list-timeout=1d chain=input comment="detect DoS attack" connection-limit=10,32 \
protocol=tcp
add action=jump chain=input comment="jump to chain ICMP" jump-target=ICMP protocol=icmp
add action=jump chain=input comment="jump to chain services" jump-target=services
add chain=input comment="Allow Broadcast Traffic" dst-address-type=broadcast
add chain=ICMP comment="0:0 and limit for 5pac/s" icmp-options=0 limit=5,5 protocol=icmp
add chain=ICMP comment="3:3 and limit for 5pac/s" icmp-options=3:3 limit=5,5 protocol=icmp
add chain=ICMP comment="3:4 and limit for 5pac/s" icmp-options=3:4 limit=5,5 protocol=icmp
add chain=ICMP comment="8:0 and limit for 5pac/s" icmp-options=8 limit=5,5 protocol=icmp
add chain=ICMP comment="11:0 and limit for 5pac/s" icmp-options=11 limit=5,5 protocol=icmp
add action=drop chain=ICMP comment="Drop everything else" protocol=icmp
add chain=services comment="accept localhost" dst-address=127.0.0.1 src-address=127.0.0.1
add chain=services comment="allow MACwinbox " dst-port=20561 protocol=udp
add chain=services comment="Bandwidth server" dst-port=2000 protocol=tcp
add chain=services comment=" MT Discovery Protocol" dst-port=5678 protocol=udp
add chain=services comment="allow SNMP" dst-port=161 protocol=tcp
add chain=services comment="Allow BGP" disabled=yes dst-port=179 protocol=tcp
add chain=services comment="allow BGP" disabled=yes dst-port=5000-5100 protocol=udp
add chain=services comment="Allow NTP" dst-port=123 protocol=udp
add chain=services comment="Allow PPTP" dst-port=1723 protocol=tcp
add chain=services comment="Allow L2TP" dst-port=1701 protocol=udp
add chain=services comment="allow PPTP and EoIP" protocol=gre
add chain=services comment="allow DNS request" dst-port=53 protocol=tcp
add chain=services comment="Allow DNS request" dst-port=53 protocol=udp
add chain=services comment=UPnP disabled=yes dst-port=1900 protocol=udp
add chain=services comment=UPnP disabled=yes dst-port=2828 protocol=tcp
add chain=services comment="allow DHCP" dst-port=67-68 protocol=udp
add chain=services comment="allow Web Proxy" disabled=yes dst-port=8080 protocol=tcp
add chain=services comment="allow IPIP" disabled=yes protocol=ipencap
add chain=services comment="allow https for Hotspot" disabled=yes dst-port=443 protocol=tcp
add chain=services comment="allow Socks for Hotspot" disabled=yes dst-port=1080 protocol=tcp
add chain=services comment="allow IPSec connections" dst-port=500 protocol=udp
add chain=services comment="allow IPSec NAT-T connections" dst-port=4500 protocol=udp
add chain=services comment="allow IPSec" protocol=ipsec-esp
add chain=services comment="allow IPSec" protocol=ipsec-ah
add chain=services comment="allow RIP" disabled=yes dst-port=520-521 protocol=udp
add chain=services comment="allow OSPF" disabled=yes protocol=ospf
add action=return chain=services
add action=log chain=input log-prefix=Filter:
add action=drop chain=input comment="drop everything else"
add chain=forward in-interface=brBusiness out-interface=brVoIP
add chain=forward in-interface=brAllVlan out-interface=brVoIP
add chain=forward in-interface=brVoIP out-interface=brBusiness
add chain=forward in-interface=brVoIP out-interface=brAllVlan
add chain=forward connection-state=new in-interface=brAllVlan out-interface=brDMZ
add action=reject chain=forward connection-state=new in-interface=brDMZ out-interface=brBusiness reject-with=icmp-net-prohibited
add action=reject chain=forward connection-state=invalid in-interface=brDMZ out-interface=brBusiness reject-with=icmp-net-prohibited
/ip firewall nat
add action=masquerade chain=srcnat out-interface=pppoe-ISP
/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 upnp
set allow-disable-external-interface=no
/ppp secret
add name=l2tpusername password=password profile=default-encryption service=l2tp
/snmp
set contact=alias@domain.tld enabled=yes location="headoffice"
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=rt-main
/system logging
set 0 topics=info,!firewall
set 1 action=disk
add action=disk topics=critical
add action=FirewallDrops topics=firewall
/system ntp client
set enabled=yes primary-ntp=148.251.6.51 secondary-ntp=89.163.224.15
/tool sniffer
set file-name=sip.pcap filter-interface=toGroundfloor filter-ip-address=192.168.127.125/32
RB951G-2HnD (non-switched configuration)
[admin@rt-basement] > /export compact
# oct/03/2014 22:12:14 by RouterOS 6.19
# software id = 2VSE-WU8G
#
/interface bridge
add l2mtu=1594 name=brBusiness
add l2mtu=1594 name=brDMZ
add l2mtu=1594 name=brVoIP protocol-mode=none
/interface wireless
set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-ht-above frequency=auto hide-ssid=yes ht-rxchains=0 ht-txchains=0 l2mtu=2290 \
mode=ap-bridge ssid=MasterAP
/ip neighbor discovery
set wlan1 discover=no
/interface vlan
add interface=ether1 l2mtu=1594 name=vlBusiness vlan-id=1000
add interface=ether1 l2mtu=1594 name=vlDMZ vlan-id=1004
add interface=ether1 l2mtu=1594 name=vlVoIP vlan-id=1001
/ip neighbor discovery
set vlBusiness discover=no
set vlDMZ discover=no
set vlVoIP discover=no
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
add authentication-types=wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=profBusiness supplicant-identity="" \
wpa2-pre-shared-key=BusinessPSK
add authentication-types=wpa-psk,wpa2-psk eap-methods="" management-protection=allowed mode=dynamic-keys name=profGuest supplicant-identity="" \
wpa-pre-shared-key=GuestPSK wpa2-pre-shared-key=GuestPSK
/interface wireless
add disabled=no mac-address=4E:5E:0C:4D:DD:CF master-interface=wlan1 name=vapBusiness security-profile=profBusiness ssid="jubelkind Business" \
wds-cost-range=0 wds-default-cost=0
add disabled=no mac-address=4E:5E:0C:4D:DD:D0 master-interface=wlan1 name=vapGuest security-profile=profGuest ssid="jubelkind Gast" wds-cost-range=0 \
wds-default-cost=0
/ip ipsec proposal
set [ find default=yes ] enc-algorithms=3des
/system logging action
set 0 memory-lines=100
set 1 disk-lines-per-file=300
add disk-lines-per-file=300 name=FirewallDrops target=disk
/interface bridge port
add bridge=brVoIP interface=vlVoIP
add bridge=brVoIP interface=ether2
add bridge=brBusiness interface=vapBusiness
add bridge=brBusiness interface=vlBusiness
add bridge=brBusiness interface=ether3
add bridge=brBusiness interface=ether4
add bridge=brBusiness interface=ether5
add bridge=brDMZ interface=vapGuest
add bridge=brDMZ interface=vlDMZ
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1
/ip firewall filter
add action=add-src-to-address-list address-list=knock address-list-timeout=15s chain=input dst-port=2014 protocol=tcp
add action=add-src-to-address-list address-list=safe address-list-timeout=15m chain=input dst-port=4102 protocol=tcp src-address-list=knock
add chain=input comment="accept established connection packets" connection-state=established
add chain=input comment="accept related connection packets" connection-state=related
add action=drop chain=input comment="drop invalid packets" connection-state=invalid
add chain=input comment="Allow access to router from known network" src-address-list=safe
add action=drop chain=input comment="detect and drop port scan connections" protocol=tcp psd=21,3s,3,1
add action=tarpit chain=input comment="suppress DoS attack" connection-limit=3,32 protocol=tcp src-address-list=black_list
add action=add-src-to-address-list address-list=black_list address-list-timeout=1d chain=input comment="detect DoS attack" connection-limit=10,32 \
protocol=tcp
add action=jump chain=input comment="jump to chain ICMP" jump-target=ICMP protocol=icmp
add action=jump chain=input comment="jump to chain services" jump-target=services
add chain=input comment="Allow Broadcast Traffic" dst-address-type=broadcast
add chain=ICMP comment="0:0 and limit for 5pac/s" icmp-options=0 limit=5,5 protocol=icmp
add chain=ICMP comment="3:3 and limit for 5pac/s" icmp-options=3:3 limit=5,5 protocol=icmp
add chain=ICMP comment="3:4 and limit for 5pac/s" icmp-options=3:4 limit=5,5 protocol=icmp
add chain=ICMP comment="8:0 and limit for 5pac/s" icmp-options=8 limit=5,5 protocol=icmp
add chain=ICMP comment="11:0 and limit for 5pac/s" icmp-options=11 limit=5,5 protocol=icmp
add action=drop chain=ICMP comment="Drop everything else" protocol=icmp
add chain=services comment="accept localhost" dst-address=127.0.0.1 src-address=127.0.0.1
add chain=services comment="allow MACwinbox " dst-port=20561 protocol=udp
add chain=services comment="Bandwidth server" dst-port=2000 protocol=tcp
add chain=services comment=" MT Discovery Protocol" dst-port=5678 protocol=udp
add chain=services comment="allow SNMP" dst-port=161 protocol=tcp
add chain=services comment="Allow BGP" disabled=yes dst-port=179 protocol=tcp
add chain=services comment="allow BGP" disabled=yes dst-port=5000-5100 protocol=udp
add chain=services comment="Allow NTP" dst-port=123 protocol=udp
add chain=services comment="Allow PPTP" dst-port=1723 protocol=tcp
add chain=services comment="allow PPTP and EoIP" protocol=gre
add chain=services comment="allow DNS request" dst-port=53 protocol=tcp
add chain=services comment="Allow DNS request" dst-port=53 protocol=udp
add chain=services comment=UPnP disabled=yes dst-port=1900 protocol=udp
add chain=services comment=UPnP disabled=yes dst-port=2828 protocol=tcp
add chain=services comment="allow DHCP" dst-port=67-68 protocol=udp
add chain=services comment="allow Web Proxy" disabled=yes dst-port=8080 protocol=tcp
add chain=services comment="allow IPIP" disabled=yes protocol=ipencap
add chain=services comment="allow https for Hotspot" disabled=yes dst-port=443 protocol=tcp
add chain=services comment="allow Socks for Hotspot" disabled=yes dst-port=1080 protocol=tcp
add chain=services comment="allow IPSec connections" dst-port=500 protocol=udp
add chain=services comment="allow IPSec" protocol=ipsec-esp
add chain=services comment="allow IPSec" protocol=ipsec-ah
add chain=services comment="allow RIP" disabled=yes dst-port=520-521 protocol=udp
add chain=services comment="allow OSPF" disabled=yes protocol=ospf
add action=return chain=services
add action=log chain=input log-prefix=Filter:
add action=drop chain=input comment="drop everything else"
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/ip upnp
set allow-disable-external-interface=no
/snmp
set contact=alias@domain.tld enabled=yes location="headoffice"
/system clock
set time-zone-name=Europe/Berlin
/system identity
set name=rt-basement
/system leds
set 0 interface=wlan1
/system logging
set 0 topics=info,!firewall
set 1 action=disk
add action=disk topics=critical
add action=FirewallDrops topics=firewall
/system ntp client
set enabled=yes primary-ntp=192.168.127.190
RB951G-2HnD (switched configuration)
[admin@rt-groundfloor] > /export compact
# jan/03/1970 07:40:17 by RouterOS 6.19
# software id = 9JPT-U9EL
#
/interface wireless
set [ find default-name=wlan1 ] l2mtu=2290 ssid=MikroTik
/interface ethernet
set [ find default-name=ether3 ] master-port=ether2
set [ find default-name=ether4 ] master-port=ether2
set [ find default-name=ether5 ] master-port=ether2
/interface vlan
add interface=ether2 l2mtu=1594 name=vlBusiness vlan-id=1000
add interface=ether2 l2mtu=1594 name=vlManagement vlan-id=1004
/interface ethernet switch port
set 1 default-vlan-id=1001 vlan-header=always-strip vlan-mode=secure
set 2 default-vlan-id=1000 vlan-header=always-strip vlan-mode=secure
set 3 default-vlan-id=1000 vlan-header=always-strip vlan-mode=secure
set 4 vlan-header=add-if-missing vlan-mode=secure
set 5 vlan-mode=secure
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/interface ethernet switch vlan
add independent-learning=no ports=ether2,ether5,switch1-cpu switch=switch1 vlan-id=1001
add independent-learning=no ports=ether3,ether4,ether5,switch1-cpu switch=switch1 vlan-id=1000
add independent-learning=no ports=ether5,switch1-cpu switch=switch1 vlan-id=1004
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=vlManagement
add add-default-route=no dhcp-options=hostname,clientid disabled=no interface=vlBusiness
/ip upnp
set allow-disable-external-interface=no
/system identity
set name=rt-groundfloor
/system leds
set 0 interface=wlan1