Skip to content

Instantly share code, notes, and snippets.

View gmanual's full-sized avatar

Graeme Noble gmanual

View GitHub Profile
# 3rd Party DNS configured for Mikrotik.
/ip dns set servers=1.1.1.1,1.0.0.1
# DHCP server set to give out internal DNS server.
/ip dhcp-server network add address=<network> dns-server=<dns ip> gateway=<mikrotik ip>
# Add DNS IP to LAN interface Disabled
/ip address add address=<dns ip> disabled=yes interface=<lan interface> network=<dns ip>
# Configure Netwatch to ping/poll the GRE Tunnel IP address.
<?php
$jsonPayload = '{}';
$signing_key = '6e6aa83e-e262-4c0a-8497-46acea553989';
$hmac = base64_encode(hash_hmac("sha256", $jsonPayload, hash('sha256', $signing_key, true) ,true));
echo PHP_EOL;
echo "Json Payload:" . PHP_EOL . $jsonPayload . PHP_EOL;
echo PHP_EOL;
echo "Sign Key : " . $signing_key . PHP_EOL;
/ip firewall connection tracking set enabled=no
:delay 10s
/ip firewall connection tracking set enabled=auto
global routername test-router
global sendtoemail routerbackups@domain.com
global sendfromdomain domain.com
global smtphost host.domain.com
global smtpuser username@domain.com
global smtppass password
global smtpport 587
global smtpstarttls yes
/system identity set name=("$routername-" . [/system routerboard get serial-number])
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/interface list member
add interface=ether1 list=WAN
/ip firewall address-list
add address=192.168.0.0/16 list=Bogon
add address=10.0.0.0/8 list=Bogon

Keybase proof

I hereby claim:

  • I am gmanual on github.
  • I am gmanual (https://keybase.io/gmanual) on keybase.
  • I have a public key whose fingerprint is 1756 46D3 DF5C 93FA B23A D7EB 8FB6 653C 62A1 2491

To claim this, I am signing this object: