# may/27/2017 11:11:09 by RouterOS 6.35.4
# software id = E66J-P7EA
#
/interface ethernet
set [ find default-name=ether1 ] name=ether1_WAN
set [ find default-name=ether2 ] name=ether2_LAN
set [ find default-name=ether3 ] master-port=ether2_LAN name=ether3_UnifiAP
set [ find default-name=ether4 ] master-port=ether2_LAN name=ether4_boxee
set [ find default-name=ether5 ] master-port=ether2_LAN name=ether5_TEST
/interface vlan
add interface=ether2_LAN name=vlan11_Admin vlan-id=11
add interface=ether2_LAN name=vlan12_Users vlan-id=12
add interface=ether2_LAN name=vlan13_guests vlan-id=13
/ip pool
add name=dhcp ranges=192.168.99.21-192.168.99.250
add name=dhcp_pool2 ranges=192.168.11.21-192.168.11.250
add name=dhcp_pool3 ranges=192.168.12.21-192.168.12.250
add name=dhcp_pool4 ranges=192.168.13.21-192.168.13.250
/ip dhcp-server
add address-pool=dhcp disabled=no interface=ether2_LAN lease-time=1h name=\
dhcp1
add address-pool=dhcp_pool2 disabled=no interface=vlan11_Admin lease-time=1h \
name=dhcp2
add address-pool=dhcp_pool3 disabled=no interface=vlan12_Users lease-time=1h \
name=dhcp3
add address-pool=dhcp_pool4 disabled=no interface=vlan13_guests lease-time=1h \
name=dhcp4
/ip firewall connection tracking
set enabled=yes
/ip address
add address=192.168.99.1/24 interface=ether2_LAN network=192.168.99.0
add address=192.168.11.1/24 interface=vlan11_Admin network=192.168.11.0
add address=192.168.12.1/24 interface=vlan12_Users network=192.168.12.0
add address=192.168.13.1/24 interface=vlan13_guests network=192.168.13.0
/ip dhcp-client
add default-route-distance=0 dhcp-options=hostname,clientid disabled=no \
interface=ether1_WAN
/ip dhcp-server network
add address=192.168.11.0/24 dns-server=192.168.11.1 gateway=192.168.11.1
add address=192.168.12.0/24 dns-server=192.168.12.1 gateway=192.168.12.1
add address=192.168.13.0/24 dns-server=192.168.13.1 gateway=192.168.13.1
add address=192.168.99.0/24 dns-server=192.168.99.1 gateway=192.168.99.1
/ip dns
set allow-remote-requests=yes servers="195.67.199.42,195.67.199.43,195.67.160.\
3,195.67.183.153,208.67.222.222,208.67.220.220,8.8.8.8,8.8.4.4"
/ip firewall address-list
add address=192.168.99.0/24 list="Admin Lan"
add address=198.168.12.0/24 list=Users_12vlan
add address=198.168.11.0/24 list="Admin Wifi_11vlan"
add address=192.168.13.0/24 list=guests_13vlan
add address=192.168.0.0/16 list=support
add address=127.0.0.0/8 comment="Loopback [RFC 3330]" list=bogons
add address=169.254.0.0/16 comment="Link Local [RFC 3330]" list=bogons
add address=192.168.0.0/16 comment="Private[RFC 1918] - CLASS C # Check if you\
\_need this subnet before enable it" disabled=yes list=bogons
add address=192.0.2.0/24 comment="Reserved - IANA - TestNet1" list=bogons
add address=192.88.99.0/24 comment="6to4 Relay Anycast [RFC 3068]" list=\
bogons
add address=198.18.0.0/15 comment="NIDB Testing" list=bogons
add address=198.51.100.0/24 comment="Reserved - IANA - TestNet2" list=bogons
add address=203.0.113.0/24 comment="Reserved - IANA - TestNet3" list=bogons
/ip firewall filter
add action=add-src-to-address-list address-list=Syn_Flooder \
address-list-timeout=30m chain=input comment=\
"Add Syn Flood IP to the list" connection-limit=30,32 protocol=tcp \
tcp-flags=syn
add action=drop chain=input comment="Drop to syn flood list" \
src-address-list=Syn_Flooder
add action=add-src-to-address-list address-list=Port_Scanner \
address-list-timeout=1w chain=input comment="Port Scanner Detect" \
protocol=tcp psd=21,3s,3,1
add action=drop chain=input comment="Drop to port scan list" \
src-address-list=Port_Scanner
add action=jump chain=input comment="Jump for icmp input flow" jump-target=\
ICMP protocol=icmp
add action=drop chain=input comment="Block all access to the winbox - except t\
o support list # DO NOT ENABLE THIS RULE BEFORE ADD YOUR SUBNET IN THE SUP\
PORT ADDRESS LIST" disabled=yes dst-port=8291 protocol=tcp \
src-address-list=!support
add action=jump chain=forward comment="Jump for icmp forward flow" \
jump-target=ICMP protocol=icmp
add action=drop chain=forward comment="Drop to bogon list" dst-address-list=\
bogons
add action=drop chain=forward comment="Avoid spammers action" dst-port=25,587 \
protocol=tcp src-address-list=spammers
add chain=input comment="Accept DNS - UDP" port=53 protocol=udp
add chain=input comment="Accept DNS - TCP" port=53 protocol=tcp
add chain=input comment="Accept to established connections" connection-state=\
established
add chain=input comment="Accept to related connections" connection-state=\
related
add chain=input comment="Full access to SUPPORT address list" \
src-address-list=support
add action=drop chain=input comment="Drop anything else! # DO NOT ENABLE THIS \
RULE BEFORE YOU MAKE SURE ABOUT ALL ACCEPT RULES YOU NEED" disabled=yes
add chain=ICMP comment="Echo reply" icmp-options=0:0 protocol=icmp
add chain=ICMP comment="Time Exceeded" icmp-options=11:0 protocol=icmp
add chain=ICMP comment="Destination unreachable" icmp-options=3:0-1 protocol=\
icmp
add chain=ICMP comment=PMTUD icmp-options=3:4 protocol=icmp
add action=drop chain=ICMP comment="Drop to the other ICMPs" protocol=icmp
add action=jump chain=output comment="Jump for icmp output" jump-target=ICMP \
protocol=icmp
/ip firewall nat
add action=masquerade chain=srcnat out-interface=ether1_WAN
add action=redirect chain=dstnat dst-port=53 protocol=udp to-ports=53
add action=redirect chain=dstnat dst-port=53 protocol=tcp to-ports=53
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Stockholm
/system routerboard settings
set protected-routerboot=disabled
As you can see I have 4 dhcp servers.
In the best of worlds I would like to have 3 security levels.
one for vpn when I'm gone from my house with full access to all on my computer (Administrator)
one for users who will get access to most of my files (users)
one for guests who will have access to internet only.
That is why I have 3 Vlans.
Is this possible since I have a windows 7 machine?
I did not succeed in my attempts so now I'm using users vlan for wifi and Lan for ethernet.
The next best thing would be 2 security levels
one for users and one for guests.
I was thinking of putting my computer and ethernet on the users vlan and guests has only access to the internet, if that is smart?
I don't really know how to do this...
If neither this is not possible I would like to have one security level with everything connected to the same network so I can see chromecast and my tablet can access the files on the computer.
Does the unifi AP take the dhcp from the lan it is connected to? I think I remember that it creates a pool of it's own and hand out. Then I will have two networks or how does it work?
Also I would like to have 4-10 static IP addresses and the rest dynamically assigned.
The statics would be my boxee box (media player), computer, chromecast and unifi AP if possible.
Suggestions?