Script inicial MIKROTIK Version 7
======================= PARTE 1
/routing/filter/rule
add chain=IXP-PEERING-NOCPERU-OUT disabled=no rule="if (dst i\
n 172.16.0.0/12 && dst-len in 12-32) { reject }"
add chain=IXP-PEERING-NOCPERU-OUT disabled=no rule=\
"if (dst in 10.0.0.0/8 && dst-len in 8-32) { reject }"
add chain=IXP-PEERING-NOCPERU-OUT disabled=no rule="if (dst i\
n 192.168.0.0/16 && dst-len in 16-32) { reject }"
/ip firewall address-list
add address=38.0.0.0/28 list=bgp-networks
/ipv6 firewall address-list
add address=2803:ffff::/43 list=bgp-networks
/routing bgp template
add address-families=ip as=64120 cisco-vpls-nlri-len-fmt=auto-bits disabled=\
no name="NOCPERU-IPV4" routing-table=main
add address-families=ipv6 as=6414 cisco-vpls-nlri-len-fmt=auto-bits disabled=\
no name="NOCPERU-IPV6" routing-table=main
/routing bgp connection
add address-families=ip as=64999 cisco-vpls-nlri-len-fmt=auto-bits connect=\
yes disabled=no hold-time=30s listen=yes local.address=38.38.38.1 .role=\
ebgp tcp-md5-key=abcdefg12345678 multihop=yes name="PEERING NOCPERU IPV4" output.network=\
bgp-networks remote.address=179.69.69.169/32 .as=64120 .port=179 \
router-id=38.38.38.1 routing-table=main templates=\
"NOCPERU-IPV4"
add address-families=ipv6 as=6414 cisco-vpls-nlri-len-fmt=auto-bits connect=\
yes disabled=no hold-time=30s listen=yes local.role=ebgp tcp-md5-key=abcdefg12345678 multihop=yes \
name="PEERING NOCPERU IPV6" output.network=bgp-networks .redistribute=\
connected,static,rip,ospf,bgp,vpn,dhcp remote.address=\
2803:8888:abcd::1234/128 .port=179 router-id=38.38.38.1 routing-table=\
main templates="NOCPERU-IPV6"
======================= PARTE 2
- dst-address=164.9.9.9.1 REEMPLAZAR IPv4 POR LA QUE SE LE DARÁ
- src-address=179.60.7.7.1 REEMPLAZAR IPv4 POR LA QUE SE LE DARÁ
- dst-address=2604:aaaa::1 REEMPLAZAR IPv6 POR LA QUE SE LE DARÁ
- src-address=2803:ffff::1 REEMPLAZAR IPv6 POR LA QUE SE LE DARÁ
/ip traffic-flow
set enabled=yes
/ip traffic-flow target
add dst-address=164.9.9.9.1 port=8888 src-address=179.60.7.7.1
add dst-address=2604:aaaa::1 port=8891 src-address=2803:ffff::1
/system clock
set time-zone-name=America/Lima
/system ntp client
set enabled=yes
/system ntp client servers
add address=200.186.125.195
add address=64.90.182.55
/ipv6 firewall filter
add action=accept chain=input comment="Allow limited ICMP - PING" limit=\
50/5s,5:packet protocol=icmpv
add action=accept chain=input comment="limited ICMP input PING" limit=\
100,5:packet protocol=icmpv6
add action=drop chain=input comment="BLOCK PING FROM WAN" protocol=icmpv6
/ip firewall filter
add action=accept chain=input comment="Allow limited ICMP - PING" limit=50/5s,5:packet protocol=icmp
add action=accept chain=forward comment="limited ICMP input PING" limit=100,5:packet protocol=icmp
add action=drop chain=input comment="BLOCK PING FROM WAN" limit=100,5:packet protocol=icmp
Version6:
/system clock
set time-zone-name=America/Lima
/system ntp client
set enabled=yes primary-ntp=200.186.125.195 secondary-ntp=64.90.182.55
/routing filter
add action=discard chain=IXP-PEERING-NOCPERU-OUT prefix=172.16.0.0/12 \
prefix-length=12-32
add action=discard chain=IXP-PEERING-NOCPERU-OUT prefix=192.168.0.0/16 \
prefix-length=16-32
add action=discard chain=IXP-PEERING-NOCPERU-OUT prefix=10.0.0.0/8 \
prefix-length=8-32
|