Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /interface bridge
- add name=br-lan
- /interface vlan
- add interface=sfp-sfpplus12 name=vlan0 vlan-id=20
- /interface macvlan
- add interface=vlan0 mac-address="REDACTEDMAC1" mode=private name=vlan1
- add interface=vlan0 mac-address="REDACTEDMAC2" mode=private name=vlan2
- add interface=vlan0 mac-address="REDACTEDMAC3" mode=private name=vlan3
- add interface=vlan0 mac-address="REDACTEDMAC4" mode=private name=vlan4
- add interface=vlan0 mac-address="REDACTEDMAC5" mode=private name=vlan5
- add interface=vlan0 mac-address="REDACTEDMAC6" mode=private name=vlan6
- /interface list
- add name=LAN
- add name=WAN
- /ip dhcp-server
- add interface=sfp-sfpplus4 name=dhcp1
- /ip pool
- add comment="dhcp (mainly wifi)" name=dhcp_pool0 ranges=192.168.1.192/26
- /ip dhcp-server
- add address-pool=dhcp_pool0 interface=br-lan name=dhcpLan
- /port
- set 0 name=serial0
- /routing table
- add disabled=no fib name=6
- add disabled=no fib name=1
- /interface bridge port
- add bridge=br-lan interface=sfp-sfpplus1
- add bridge=br-lan interface=sfp-sfpplus2
- add bridge=br-lan interface=sfp-sfpplus3
- add bridge=br-lan interface=sfp-sfpplus5
- add bridge=br-lan interface=sfp-sfpplus6
- add bridge=br-lan interface=sfp-sfpplus7
- add bridge=br-lan interface=sfp-sfpplus8
- add bridge=br-lan interface=sfp-sfpplus9
- add bridge=br-lan interface=sfp-sfpplus10
- add bridge=br-lan interface=sfp-sfpplus11
- add bridge=br-lan interface=sfp28-1
- add bridge=br-lan interface=sfp28-2
- /interface list member
- add interface=br-lan list=LAN
- add interface=ether1 list=LAN
- add interface=vlan0 list=WAN
- add interface=vlan2 list=WAN
- add interface=vlan3 list=WAN
- add interface=vlan4 list=WAN
- add interface=vlan5 list=WAN
- add interface=vlan6 list=WAN
- add interface=vlan1 list=WAN
- add interface=sfp-sfpplus4 list=LAN
- /ip address
- add address=192.168.88.1/24 comment=defconf interface=ether1 network=\
- 192.168.88.0
- add address=192.168.1.1/20 interface=br-lan network=192.168.0.0
- add address="REDACTEDPUBLICIP1.2" interface=sfp-sfpplus4 network="REDACTEDPUBLICIP1.2"
- /ip dhcp-client
- add comment="ip dhcp 0" interface=vlan0 use-peer-dns=no
- add add-default-route=no comment="ip dhcp 1" interface=vlan1 use-peer-dns=no
- add add-default-route=no comment="ip dhcp 2" interface=vlan2
- add add-default-route=no comment="ip dhcp 3" interface=vlan3
- add add-default-route=no comment="ip dhcp 4" interface=vlan4
- add add-default-route=no comment="ip dhcp 5" interface=vlan5
- add add-default-route=no comment="ip dhcp 6" interface=vlan6 use-peer-dns=no
- /ip dhcp-server lease
- add address="REDACTEDPUBLICIP1.192" mac-address="REDACTEDMACSERVER1" server=dhcp1
- /ip dhcp-server network
- add address="REDACTEDPUBLICIP1.192"/32 dns-server=9.9.9.9 gateway="REDACTEDPUBLICIP1.2"
- add address=192.168.1.192/26 dns-server=9.9.9.9 gateway=192.168.1.1 netmask=\
- 24
- /ip dns
- set allow-remote-requests=yes servers=\
- 9.9.9.9,149.112.112.112,2620:fe::fe,2620:fe::9 verify-doh-cert=yes
- /ip firewall filter
- add action=accept chain=forward src-address="REDACTEDPUBLICIP1.192"
- add action=accept chain=forward dst-address="REDACTEDPUBLICIP1.192"
- add action=drop chain=input comment="drop huawei mac" src-mac-address=\
- "REDACTEDHUAWEIMAC"
- add action=drop chain=forward comment="drop huawei mac" src-mac-address=\
- "REDACTEDHUAWEIMAC"
- 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=drop chain=forward comment="defconf: drop invalid" \
- connection-state=invalid
- add action=accept chain=forward comment=\
- "defconf: accept established,related, untracked" connection-state=\
- established,related,untracked
- 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=src-nat chain=srcnat comment=vlan6dhcp out-interface-list=WAN \
- src-address=192.168.1.192/26 to-addresses="REDACTEDPUBLICIP6"
- add action=src-nat chain=srcnat comment=vlan0 out-interface-list=WAN \
- src-address=192.168.1.0/24 to-addresses="REDACTEDPUBLICIP0"
- add action=src-nat chain=srcnat comment=vlan6 out-interface-list=WAN \
- src-address=192.168.2.0/24 to-addresses="REDACTEDPUBLICIP6"
- add action=dst-nat chain=dstnat comment=transmission dst-port="REDACTEDPORT" \
- in-interface=vlan0 protocol=tcp to-addresses=192.168.1.101
- add action=dst-nat chain=dstnat comment=transmission dst-port="REDACTEDPORT" \
- in-interface=vlan0 protocol=udp to-addresses=192.168.1.101
- add action=dst-nat chain=dstnat dst-port=7421 in-interface=\
- vlan0 protocol=tcp to-addresses=192.168.1.60
- add action=dst-nat chain=dstnat dst-port=7422 in-interface=\
- vlan0 protocol=tcp to-addresses=192.168.1.60
- add action=dst-nat chain=dstnat comment=tor1 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor2 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor3 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor4 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor5 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor6 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor7 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=tor8 dst-port="REDACTEDPORT" in-interface=vlan0 \
- protocol=tcp to-addresses=192.168.1.62
- add action=dst-nat chain=dstnat comment=test22 disabled=yes dst-port=22 \
- in-interface=vlan0 protocol=tcp to-addresses=192.168.1.62
- /ip route
- add disabled=no distance=2 dst-address=0.0.0.0/0 gateway="REDACTEDPUBLICIP6".1 \
- routing-table=6 scope=30 suppress-hw-offload=no target-scope=10
- add disabled=no distance=1 dst-address=192.168.0.0/20 gateway=br-lan \
- routing-table=6 scope=10 suppress-hw-offload=no
- add disabled=no distance=2 dst-address=0.0.0.0/0 gateway="REDACTEDPUBLICIP1".1 \
- routing-table=1 scope=30 suppress-hw-offload=no target-scope=10
- add disabled=yes distance=1 dst-address=192.168.0.0/20 gateway=br-lan \
- routing-table=1 scope=10 suppress-hw-offload=no target-scope=10
- add disabled=no distance=1 dst-address="REDACTEDPUBLICIP1.2"/32 gateway=sfp-sfpplus4 \
- routing-table=1 scope=10 suppress-hw-offload=no target-scope=10
- add disabled=yes distance=1 dst-address="REDACTEDPUBLICIP1.192"/32 gateway=\
- sfp-sfpplus4 routing-table=1 scope=10 suppress-hw-offload=no \
- target-scope=10
- add disabled=yes distance=1 dst-address="REDACTEDPUBLICIP1.192"/32 gateway=\
- sfp-sfpplus4 routing-table=main scope=10 suppress-hw-offload=no \
- target-scope=10
- /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
- /ipv6 address
- add comment="V6 1st bloc" from-pool=dhcpv6 \
- interface=br-lan
- add comment="V6 2nd blocSFP4" from-pool=dhcpv6 interface=sfp-sfpplus4
- /ipv6 dhcp-client
- add add-default-route=yes comment="dhcp client ipv6" interface=vlan0 \
- pool-name=dhcpv6 prefix-hint=::/56 request=prefix
- /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=forward comment="drop huawei mac" src-mac-address=\
- "REDACTEDHUAWEIMAC"
- add action=drop chain=input comment="drop huawei mac" src-mac-address=\
- "REDACTEDHUAWEIMAC"
- add action=drop chain=input comment="defconf: drop invalid" connection-state=\
- invalid
- add action=accept chain=forward comment="accept transmission" dst-address=\
- "REDACTEDIPV6-1"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept transmission" dst-address=\
- "REDACTEDIPV6-1"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=udp
- add action=accept chain=forward comment="accept bitcoin" dst-address=\
- "REDACTEDIPV6-2"/128 dst-port=8333 \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept monero" dst-address=\
- "REDACTEDIPV6-2"/128 dst-port=18080 \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor1" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor2" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor3" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor4" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor5" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor6" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor7" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- add action=accept chain=forward comment="accept tor8" dst-address=\
- "REDACTEDIPV6-3"/128 dst-port="REDACTEDPORT" \
- in-interface-list=WAN protocol=tcp
- 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 UDP traceroute" \
- dst-port=33434-33534 protocol=udp
- 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
- /routing rule
- add action=lookup comment=6 disabled=no src-address=192.168.2.0/24 table=6
- add action=lookup comment="6 for wifi" disabled=no src-address=\
- 192.168.1.192/26 table=6
- add action=lookup disabled=no src-address="REDACTEDPUBLICIP1.192"/32 table=1
Advertisement
Add Comment
Please, Sign In to add comment