Labs Preconfigure
/ip address
add address=10.55.65.1/24 interface=ether2 network=10.55.65.0 comment="To DMZ"
/ip dhcp-client
add interface=ether1 comment="WAN DHCP Client"
/ip firewall nat
add action=masquerade chain=srcnat comment="NAT for Internet Access" \
out-interface=ether1
network:
version: 2
ethernets:
eth0:
dhcp4: false
addresses:
- 10.55.65.80/24
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
routes:
- to: 0.0.0.0/0
via: 10.55.65.1
apt install nginx
[admin@MikroTik] > ip address print
Flags: D - DYNAMIC
Columns: ADDRESS, NETWORK, INTERFACE
# ADDRESS NETWORK INTERFACE
0 D 203.0.113.228/24 203.0.113.0 ether1
;;; To DMZ
1 10.55.65.1/24 10.55.65.0 ether2
/ip firewall nat
add action=dst-nat chain=dstnat comment="Port forward HTTP to webserver" \
dst-address=203.0.113.228 dst-port=8080 protocol=tcp \
to-addresses=10.55.65.80 to-ports=80
To Verify this now you can access it via http://203.0.113.228:8080