Skip to content

Instantly share code, notes, and snippets.

@aejh
Last active January 4, 2021 09:59
Show Gist options
  • Save aejh/1fda0fa745de25384e8301e2108fb272 to your computer and use it in GitHub Desktop.
Save aejh/1fda0fa745de25384e8301e2108fb272 to your computer and use it in GitHub Desktop.
Common Mikrotik settings easier to add by cli
# Used in a typical home environment, WAN IP to internet, with NAT to LAN
# Add a port foward
/ip firewall nat add chain=dstnat dst-address=<WAN-IP> dst-port=<PORT> protocol=[tcp|udp] action=dst-nat to-addresses=<LAN-IP>
# Add a static DHCP lease
/ip dhcp-server lease add address=<LEASED-ADDRESS> mac-address=<MAC-ADDR> server="<DHCP-SERVER-NAME>" disabled=no
# Add hostname to DNS server
/ip dns static add name=<HOSTNAME> address=<IP-ADDRESS>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment