Skip to content

Instantly share code, notes, and snippets.

@kurnias
Created April 10, 2016 08:33
Show Gist options
  • Save kurnias/22479739b86e68c0c77e539fc1ad6cf2 to your computer and use it in GitHub Desktop.
Save kurnias/22479739b86e68c0c77e539fc1ad6cf2 to your computer and use it in GitHub Desktop.
/ip address
add interface=ether1 address=192.168.1.1/24
add interface=ether2 address=192.168.2.1/24
/ip pool
add name=pool1 ranges=192.168.1.10-192.168.1.254
add name=pool2 ranges=192.168.2.10-192.168.2.254
/ip dhcp-server
add disabled=no authoritative=yes bootp-support=none name=dhcp1 interface=ether1 address-pool=pool1
add disabled=no authoritative=yes bootp-support=none name=dhcp2 interface=ether2 address-pool=pool2
/ip dhcp-server network
add address=192.168.1.0/24 gateway=192.168.1.1
add address=192.168.2.0/24 gateway=192.168.2.1
/ip dhcp-client
add disabled=no interface=WAN use-peer-dns=yes add-default-route=yes
/ip firewall connection tracking
set enabled=yes
/ip firewall filter
add chain=forward action=accept connection-state=established
add chain=forward action=accept connection-state=related
add chain=forward action=drop connection-state=invalid
add chain=forward action=drop out-interface=!WAN src-address=192.168.1.0/24 comment="Prevent inter-subnet communication"
add chain=forward action=drop out-interface=!WAN src-address=192.168.2.0/24 comment="Prevent inter-subnet communication"
/ip firewall nat
add chain=srcnat action=masquerade out-interface=WAN
@kurnias
Copy link
Author

kurnias commented Apr 10, 2016

Setting interface Mikrotik untuk dual DHCP di dua interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment