Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # feb/21/2022 12:24:56 by RouterOS 7.1.2
- # software id = AMZZ-D334
- #
- # model = RouterBOARD 3011UiAS
- # serial number = 8EED08B9D374
- /interface bridge
- add admin-mac=CC:2D:E0:8A:04:4C auto-mac=no comment=defconf name=bridge protocol-mode=none
- add igmp-snooping=yes name=bridge-vlan10
- add name=bridge1
- /interface ethernet
- set [ find default-name=sfp1 ] auto-negotiation=no
- /interface wireguard
- add listen-port=13231 mtu=1420 name=mullvad
- add listen-port=18889 mtu=1420 name=wireguard-movil-ipv6
- add listen-port=18890 mtu=1420 name=wireguard-neinor
- add listen-port=18888 mtu=1420 name=wireguard-remoto
- /interface 6to4
- add !keepalive mtu=1280 name=6to4-tunnel1 remote-address=216.66.84.42
- /interface eoip
- add !keepalive local-address=10.0.1.8 mac-address=02:F4:B6:B4:73:3D mtu=1370 name=eoip-fibra \
- remote-address=10.0.2.5 tunnel-id=2
- add !keepalive local-address=10.0.6.1 mac-address=02:75:59:A7:8F:58 mtu=1370 name=eoip-movistar \
- remote-address=10.0.6.2 tunnel-id=1
- add !keepalive mac-address=02:CA:33:F7:AC:44 mtu=1370 name=eoip-vlan10 remote-address=10.0.1.246 \
- tunnel-id=4
- /interface vlan
- add interface=ether5 name=internet-vlan6 vlan-id=6
- add interface=ether5 name=vlan2-iptv vlan-id=2
- add interface=ether5 name=voip-vlan3 vlan-id=3
- /interface pppoe-client
- add add-default-route=yes disabled=no interface=internet-vlan6 max-mru=1492 max-mtu=1492 name=\
- internet use-peer-dns=yes user=adslppp@telefonicanetpa
- /interface list
- add comment=defconf name=WAN
- add comment=defconf name=LAN
- add comment="Vlan2 (Iptv) & Vlan3 (Voip)" name=Vlan2&3
- /interface lte apn
- set [ find default=yes ] ip-type=ipv4
- /interface wireless security-profiles
- set [ find default=yes ] supplicant-identity=MikroTik
- /ip dhcp-server option
- add code=240 name=option_para_deco value="':::::239.0.2.10:22222:v6.0:239.0.2.30:22222'"
- /ip pool
- add name=pool-iptv-descos ranges=192.168.1.201-192.168.1.206
- add name=pool-vlan10 ranges=192.168.1.10-192.168.1.199
- add name=dhcp-lan ranges=10.0.1.100-10.0.1.200
- add name=dhcp-vlan50 ranges=10.0.50.10-10.0.50.200
- add name=dhcp-vlan100 ranges=10.0.100.10-10.0.100.200
- /ip dhcp-server
- add address-pool=pool-iptv-descos interface=bridge-vlan10 name=dhcp-server-iptv
- /port
- set 0 name=serial0
- /routing rip instance
- add afi=ipv4 disabled=no name=rip
- add afi=ipv4 disabled=no name=rip
- /routing table
- add disabled=no fib name=mullvad
- /interface bridge port
- add bridge=bridge comment=defconf ingress-filtering=no interface=ether3
- add bridge=bridge comment=defconf ingress-filtering=no interface=ether4
- add bridge=bridge-vlan10 comment=defconf ingress-filtering=no interface=ether7
- add bridge=bridge comment=defconf ingress-filtering=no interface=ether8
- add bridge=bridge comment=defconf ingress-filtering=no interface=ether9
- add bridge=bridge comment=defconf ingress-filtering=no interface=ether10
- add bridge=bridge interface=ether1
- add bridge=bridge1 interface=eoip-movistar
- add bridge=bridge1 interface=eoip-vlan10
- add bridge=bridge1 interface=eoip-fibra
- add bridge=bridge interface=ether2
- add bridge=bridge-vlan10 interface=ether6
- /ip neighbor discovery-settings
- set discover-interface-list=LAN
- /ip settings
- set max-neighbor-entries=8192
- /ipv6 settings
- set max-neighbor-entries=8192
- /interface list member
- add interface=bridge list=LAN
- add interface=internet-vlan6 list=WAN
- add interface=voip-vlan3 list=Vlan2&3
- add interface=vlan2-iptv list=Vlan2&3
- /interface wireguard peers
- add allowed-address=10.0.6.2/32,10.0.2.0/24 endpoint-address=xxx \
- endpoint-port=x interface=wireguard-neinor public-key=\
- ""
- add allowed-address= interface=wireguard-movil-ipv6 public-key=\
- ""
- add allowed-address=10.0.10.2/32 interface=wireguard-remoto public-key=\
- ""
- add allowed-address=0.0.0.0/0,::/0 endpoint-address=194.99.104.10 endpoint-port=51820 interface=\
- mullvad public-key=""
- /ip address
- add address=10.0.1.8/24 interface=bridge network=10.0.1.0
- add address=10.0.6.1/30 interface=wireguard-neinor network=10.0.6.0
- add address=10.0.10.1/24 interface=wireguard-remoto network=10.0.10.0
- add address=IPTV/9 interface=vlan2-iptv network=10.128.0.0
- add address=IPinterface=mullvad network=10.124.0.23
- add address=192.168.2.1/24 interface=sfp1 network=192.168.2.0
- add address=192.168.1.1/24 interface=bridge-vlan10 network=192.168.1.0
- /ip cloud
- set ddns-enabled=yes
- /ip dhcp-client
- add add-default-route=no interface=voip-vlan3
- /ip dhcp-server network
- add address=10.0.1.0/24 dns-server=10.0.1.10 gateway=10.0.1.1 netmask=24
- add address=192.168.1.200/29 comment="IPTV subnet for descos" dhcp-option=option_para_deco \
- dns-server=172.26.23.3 gateway=192.168.1.1 netmask=24
- /ip dhcp-server vendor-class-id
- add address-pool=pool-iptv-descos name="Movistar Descos" server=dhcp-server-iptv vid="\"[IAL]\""
- /ip dns
- set allow-remote-requests=yes servers=100.64.0.7,10.0.1.10
- /ip dns static
- add address=192.168.88.1 comment=defconf name=router.lan
- /ip firewall filter
- add action=accept chain=input in-interface=vlan2-iptv
- add action=accept chain=input comment="Accept vlan2 Iptv IGMP packets" in-interface=vlan2-iptv \
- protocol=igmp
- add action=accept chain=input comment="defconf: accept established,related,untracked" \
- connection-state=established,related,untracked
- add action=accept chain=input comment="Acepta el trafico de la vlan del telefono" in-interface=\
- voip-vlan3 src-address=10.0.0.0/8
- add action=accept chain=input comment="Accept vlan2 & 3 (Iptv & Voip) multicast & broadcast traffic" \
- dst-address-type=!unicast in-interface-list=Vlan2&3
- 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=accept chain=input comment="voip: accept rip multicast traffic" dst-address=224.0.0.9 \
- dst-port=520 in-interface=voip-vlan3 protocol=udp
- add action=drop chain=input in-interface=mullvad
- 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=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=\
- "Drop all new unicast traffic from vlan3 & 2 (Voip & Iptv) not DSTNATed" connection-nat-state=\
- !dstnat connection-state=new dst-address-type=unicast in-interface-list=Vlan2&3
- add action=drop chain=forward connection-nat-state=!dstnat connection-state=new in-interface=mullvad
- 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 mangle
- add action=mark-routing chain=output dst-address=100.64.0.7 new-routing-mark=mullvad passthrough=no
- add action=mark-routing chain=prerouting disabled=yes in-interface=ether2 new-routing-mark=mullvad \
- passthrough=no
- add action=set-priority chain=postrouting comment="Prioritise Iptv packets" new-priority=4 \
- out-interface=vlan2-iptv passthrough=yes
- add action=set-priority chain=postrouting comment="Prioritise Voip packets" new-priority=5 \
- out-interface=voip-vlan3 passthrough=yes
- add action=set-priority chain=postrouting new-priority=1 out-interface=internet-vlan6
- add action=add-src-to-address-list address-list=vod-receiver address-list-timeout=1m chain=\
- postrouting comment="RTSP - VOD Movistar" connection-state=new dst-port=554 out-interface=\
- vlan2-iptv protocol=tcp
- /ip firewall nat
- add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none \
- out-interface-list=WAN
- add action=masquerade chain=srcnat out-interface=vlan2-iptv
- add action=masquerade chain=srcnat comment="masq. vlan2 & vlan3 (Iptv & Voip)" out-interface-list=\
- Vlan2&3
- add action=masquerade chain=srcnat out-interface=mullvad
- add action=masquerade chain=srcnat src-address=10.0.1.0/24
- add action=masquerade chain=srcnat src-address=10.0.50.0/24
- add action=masquerade chain=srcnat src-address=10.0.100.0/24
- add action=masquerade chain=srcnat src-address=192.168.1.0/24
- add action=masquerade chain=srcnat dst-address=10.0.10.0/24
- add action=dst-nat chain=dstnat comment="VOD Movistar 1 Desco" dst-address-type=local in-interface=\
- vlan2-iptv to-addresses=192.168.1.203
- /ip firewall service-port
- set ftp disabled=yes
- set tftp disabled=yes
- set irc disabled=yes
- set h323 disabled=yes
- set sip disabled=yes
- set pptp disabled=yes
- /ip route
- add disabled=no distance=1 dst-address=10.0.2.0/24 gateway=10.0.6.2 pref-src=0.0.0.0 routing-table=\
- main scope=30 suppress-hw-offload=no target-scope=10
- add disabled=no dst-address=10.0.50.1/24 gateway=10.0.1.1 routing-table=main suppress-hw-offload=no
- add disabled=no dst-address=10.0.100.0/24 gateway=10.0.1.1 routing-table=main suppress-hw-offload=no
- add disabled=no distance=10 dst-address=0.0.0.0/0 gateway=10.0.1.1 pref-src=0.0.0.0 routing-table=\
- main scope=30 suppress-hw-offload=no target-scope=10
- add disabled=no dst-address=172.23.96.0/21 gateway=10.128.0.1 routing-table=main suppress-hw-offload=\
- no
- add disabled=no dst-address=172.26.22.0/26 gateway=10.128.0.1 routing-table=main suppress-hw-offload=\
- no
- add disabled=no dst-address=172.26.23.0/27 gateway=10.128.0.1 routing-table=main suppress-hw-offload=\
- no
- add disabled=no dst-address=172.26.80.0/21 gateway=10.128.0.1 routing-table=main suppress-hw-offload=\
- no
- add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.124.0.23 pref-src=0.0.0.0 routing-table=\
- mullvad scope=30 suppress-hw-offload=no target-scope=10
- add disabled=no dst-address=100.64.0.7 gateway=10.124.0.23 routing-table=main suppress-hw-offload=no
- /ipv6 route
- add disabled=no distance=1 dst-address=2000::/3 gateway=xx scope=30 target-scope=10
- add disabled=yes distance=1 dst-address=::/0 gateway=fc00:bbbb:bbbb:bb01::1 routing-table=mullvad \
- scope=30 target-scope=10
- /ip service
- set telnet disabled=yes
- set ftp disabled=yes
- set api disabled=yes
- set api-ssl disabled=yes
- /ipv6 address
- add address=x interface=6to4-tunnel1
- add address=x interface=bridge
- add address=x interface=wireguard-movil-ipv6
- add address=xx/128 advertise=no interface=mullvad
- /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
- add address=::224.0.0.0/100 comment="defconf: other" list=bad_ipv6
- add address=::127.0.0.0/104 comment="defconf: other" list=bad_ipv6
- add address=::/104 comment="defconf: other" list=bad_ipv6
- add address=::255.0.0.0/104 comment="defconf: other" 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=input in-interface=mullvad
- add action=drop chain=input comment="defconf: drop invalid" connection-state=invalid
- add action=accept chain=input comment="defconf: accept ICMPv6" protocol=icmpv6
- add action=accept chain=input comment="defconf: accept UDP traceroute" 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" disabled=yes dst-port=500,4500 protocol=\
- udp
- add action=accept chain=input comment="defconf: accept ipsec AH" disabled=yes protocol=ipsec-ah
- add action=accept chain=input comment="defconf: accept ipsec ESP" disabled=yes 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=drop chain=forward comment="defconf: drop everything else not coming from LAN" \
- in-interface-list=!LAN
- add action=drop chain=forward connection-state=new in-interface=mullvad
- 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" disabled=yes dst-port=500,4500 \
- protocol=udp
- add action=accept chain=forward comment="defconf: accept ipsec AH" disabled=yes protocol=ipsec-ah
- add action=accept chain=forward comment="defconf: accept ipsec ESP" disabled=yes protocol=ipsec-esp
- add action=accept chain=forward comment="defconf: accept all that matches ipsec policy" disabled=yes \
- ipsec-policy=in,ipsec
- /ipv6 firewall mangle
- add action=mark-routing chain=prerouting disabled=yes in-interface=ether2 new-routing-mark=mullvad \
- passthrough=no
- /ipv6 firewall nat
- add action=masquerade chain=srcnat out-interface=mullvad
- /ipv6 nd
- set [ find default=yes ] managed-address-configuration=yes other-configuration=yes
- /routing igmp-proxy
- set query-interval=30s quick-leave=yes
- /routing igmp-proxy interface
- add alternative-subnets=0.0.0.0/0 interface=vlan2-iptv upstream=yes
- add interface=bridge-vlan10
- /routing rip interface-template
- add disabled=no instance=rip interfaces=vlan2-iptv mode=passive
- add disabled=no instance=rip interfaces=voip-vlan3 mode=passive
- /routing rule
- add action=lookup-only-in-table routing-mark=mullvad table=mullvad
- /system clock
- set time-zone-name=Europe/Madrid
- /system scheduler
- add interval=6s name=vod on-event=vod policy=read,write start-time=startup
- /system script
- add dont-require-permissions=no name=vod owner=admin policy=read,write source=":local iplist [:len [/i\
- p firewall address-list find list=\"vod-receiver\"]]\
- \n:local rules [:len [/ip firewall nat find where comment=\"VOD Script\"]]\
- \n#:log info \"VODScript: IPs in list are \$iplist !\"\
- \n#:log info \"VODScript: Rules are \$rules !\"\
- \n:if (\$iplist = 0 and \$rules > 0) do={\
- \n\t#/ip firewall nat remove [find comment=\"VOD Script\"];\
- \n\t#:log info \"VODScript: Rule removed !\"\
- \n} else {\
- \n\t:local ipadressnew [/ip firewall address-list get [:pick [/ip firewall address-list find list=\
- \"vod-receiver\"] (\$iplist-1)] address]\
- \n\t:local ipadressold \"None\"\
- \n\t#:log info \"VODScript: IP address new is \$ipadressnew !\"\
- \n\t:if (\$iplist > 0 ) do {\
- \n\t\tif (\$rules > 0 ) do {\
- \n\t\t\t:set ipadressold [/ip firewall nat get [find comment=\"VOD Script\"] to-addresses] \
- \n\t\t\t#:log info \"VODScript: IP address old is \$ipadressold !\"\
- \n\t\t}\
- \n\t\t:if (\$ipadressnew != \$ipadressold) do={\
- \n\t\t\tif (\$rules > 0 ) do {\
- \n\t\t\t\t/ip firewall nat remove [find comment=\"VOD Script\"];\
- \n\t\t\t}\
- \n\t\t\t/ip firewall nat add action=dst-nat chain=dstnat comment=\"VOD Script\" dst-address-type=l\
- ocal in-interface=iptv-vlan2 to-addresses=\$ipadressnew\
- \n\t\t\t:log info \"VODScript: IP address changed from \$ipadressold to \$ipadressnew !\"\
- \n\t\t}\
- \n\t}\
- \n}"
- /tool mac-server
- set allowed-interface-list=LAN
- /tool mac-server mac-winbox
- set allowed-interface-list=LAN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement