Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [admin@MikroTik] > /export
- # oct/09/2018 16:34:44 by RouterOS 6.43.2
- # software id = 6A4C-U1D3
- #
- # model = 951G-2HnD
- # serial number =
- /interface bridge
- add admin-mac= auto-mac=no comment=defconf fast-forward=no name=bridge
- /interface wireless
- set [ find default-name=wlan1 ] band=2ghz-b/g/n channel-width=20/40mhz-Ce distance=indoors frequency=auto mode=ap-bridge ssid=MikroTik-6F5991 wireless-protocol=802.11
- /interface ethernet
- set [ find default-name=ether1 ] speed=100Mbps
- set [ find default-name=ether2 ] name=ether2-master speed=100Mbps
- set [ find default-name=ether3 ] speed=100Mbps
- set [ find default-name=ether4 ] speed=100Mbps
- set [ find default-name=ether5 ] speed=100Mbps
- /interface list
- add exclude=dynamic name=discover
- add name=mactel
- add name=mac-winbox
- /interface wireless security-profiles
- set [ find default=yes ] supplicant-identity=MikroTik
- /ip ipsec peer profile
- add dh-group=modp768 enc-algorithm=aes-256 name=profile_1
- add dh-group=modp768 enc-algorithm=aes-256 name=profile_2
- add dh-group=modp768 enc-algorithm=aes-256 name=profile_3
- add dh-group=modp768 enc-algorithm=aes-256 name=profile_4
- /ip ipsec proposal
- set [ find default=yes ] enc-algorithms=aes-256-cbc,aes-256-ctr lifetime=1d pfs-group=modp768
- /ip pool
- add name=dhcp ranges=192.168.88.10-192.168.88.254
- /ip dhcp-server
- add address-pool=dhcp authoritative=after-2sec-delay disabled=no interface=bridge name=defconf
- /snmp community
- set [ find default=yes ] addresses=0.0.0.0/0
- /system logging action
- set 0 memory-lines=1
- set 1 disk-file-name=log
- /interface bridge port
- add bridge=bridge comment=defconf interface=ether2-master
- add bridge=bridge comment=defconf interface=wlan1
- add bridge=bridge interface=ether3
- add bridge=bridge interface=ether4
- add bridge=bridge interface=ether5
- /ip neighbor discovery-settings
- set discover-interface-list=discover
- /interface list member
- add interface=ether2-master list=discover
- add interface=ether3 list=discover
- add interface=ether4 list=discover
- add interface=ether5 list=discover
- add interface=wlan1 list=discover
- add interface=bridge list=discover
- add interface=bridge list=mactel
- add interface=bridge list=mac-winbox
- /ip address
- add address=192.168.88.1/24 comment=defconf interface=ether2-master network=192.168.88.0
- add address=###.###.###.###/25 interface=ether1 network=###.###.###.###
- /ip dhcp-client
- add comment=defconf dhcp-options=hostname,clientid interface=ether1
- /ip dhcp-server network
- add address=192.168.88.0/24 comment=defconf dns-server=192.168.98.1,77.88.8.88,77.88.8.2 gateway=192.168.88.1 ntp-server=216.239.35.8
- /ip dns
- set allow-remote-requests=yes servers=192.168.98.1,109.194.160.1,109.194.161.1
- /ip dns static
- add address=192.168.88.1 name=router
- add address=192.168.91.16 name=unifi
- /ip firewall address-list
- add address=192.168.91.0/24 list="Internal nets"
- add address=192.168.88.0/24 list="Internal nets"
- add address=192.168.90.0/24 list="Internal nets"
- add address=192.168.98.0/24 list="Internal nets"
- add address=192.168.92.0/24 list="Internal nets"
- /ip firewall filter
- add action=accept chain=input comment="defconf: accept ICMP" protocol=icmp
- add chain=input comment="Allow IKE/NAT-T for IPSec" dst-port=500,4500 log-prefix=IKE/NAT-T protocol=udp
- add chain=input comment="Allow IPSec-esp" protocol=ipsec-esp
- add chain=output comment="Allow IKE/NAT-T for IPSec" log-prefix=IKE/NAT-T protocol=udp src-port=500,4500
- add chain=output comment="Allow ESP for IPSec" log-prefix=ESP protocol=ipsec-esp
- add chain=forward comment="Accept, when packet from internal net to internal net (between vlans)" dst-address-list="Internal nets" src-address-list="Internal nets"
- add action=accept chain=input comment="defconf: accept established,related" connection-state=established,related
- add action=accept chain=input src-address-list="Internal nets"
- add action=drop chain=input comment="defconf: drop all from WAN" disabled=yes in-interface=ether1
- add action=accept chain=forward disabled=yes dst-address=192.168.88.3 dst-port=443 protocol=tcp
- add action=fasttrack-connection chain=forward comment="defconf: fasttrack" connection-state=established,related
- add action=accept chain=forward comment="defconf: accept established,related" connection-state=established,related
- 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=ether1
- add chain=input comment="Input Chain" connection-state=established
- add chain=input connection-state=related
- add action=drop chain=input connection-state=invalid
- add chain=input protocol=icmp
- add chain=input dst-port=8291 protocol=tcp
- add chain=input in-interface=bridge
- add action=log chain=input disabled=yes log-prefix=Drop
- add action=drop chain=input
- add action=add-src-to-address-list address-list=Ok address-list-timeout=15s chain=input comment=sysadminpxy dst-port=8080 protocol=tcp
- /ip firewall nat
- add action=redirect chain=dstnat comment=sysadminpxy disabled=yes dst-port=80 protocol=tcp src-address-list=!Ok to-ports=8080
- add action=accept chain=srcnat comment="Does not touch IPSec ESP packets to avoid break packets checksum" ipsec-policy=out,ipsec log-prefix="NAT avoid" out-interface=ether1
- add action=netmap chain=dstnat disabled=yes in-interface=ether1 protocol=tcp to-addresses=192.168.88.3 to-ports=443
- add action=accept chain=srcnat dst-address=192.168.88.3 dst-port=443 protocol=tcp
- add action=accept chain=srcnat dst-address=192.168.88.3 dst-port=17990 protocol=tcp
- add action=masquerade chain=srcnat comment="defconf: masquerade" out-interface=ether1
- add action=netmap chain=dstnat disabled=yes in-interface=ether1 protocol=tcp to-addresses=192.168.88.3 to-ports=17990
- /ip ipsec peer
- add address=###.###.###.###/32 generate-policy=port-override profile=profile_1 secret="%PAssw#ord"
- add address=###.###.###.###/32 generate-policy=port-override profile=profile_2 secret="%PAssw#ord"
- add address=###.###.###.###/32 generate-policy=port-override profile=profile_3 secret="%PAssw#ord"
- add address=###.###.###.###/32 generate-policy=port-override profile=profile_4 secret="%PAssw#ord"
- /ip ipsec policy
- set 0 disabled=yes
- add dst-address=192.168.91.0/24 sa-dst-address=###.###.###.### sa-src-address=###.###.###.### src-address=192.168.88.0/24 tunnel=yes
- add dst-address=192.168.90.0/24 sa-dst-address=###.###.###.### sa-src-address=###.###.###.### src-address=192.168.88.0/24 tunnel=yes
- add dst-address=192.168.98.0/24 sa-dst-address=###.###.###.### sa-src-address=###.###.###.### src-address=192.168.88.0/24 tunnel=yes
- add dst-address=192.168.92.0/24 sa-dst-address=###.###.###.### sa-src-address=###.###.###.### src-address=192.168.88.0/24 tunnel=yes
- /ip proxy access
- add action=deny disabled=yes
- /ip route
- add distance=1 gateway=###.###.###.###
- /ip service
- set telnet address=0.0.0.0/0 disabled=yes port=123
- set www disabled=yes
- /ip socks
- set port=45110
- /system clock
- set time-zone-name=Asia/Yekaterinburg
- /system routerboard settings
- set silent-boot=no
- /tool mac-server
- set allowed-interface-list=mactel
- /tool mac-server mac-winbox
- set allowed-interface-list=mac-winbox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement