Last active
January 4, 2021 09:59
-
-
Save aejh/1fda0fa745de25384e8301e2108fb272 to your computer and use it in GitHub Desktop.
Common Mikrotik settings easier to add by cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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