| | 35 | Setup firewall NAT on Mikrotik |
| | 36 | {{{ |
| | 37 | [admin@MK53] /ip/firewall/nat> print |
| | 38 | Flags: X - disabled, I - invalid; D - dynamic |
| | 39 | 0 ;;; defconf: masquerade |
| | 40 | chain=srcnat action=masquerade in-interface=bridge out-interface=wifi1 |
| | 41 | out-interface-list=WAN log=no log-prefix="" ipsec-policy=out,none |
| | 42 | |
| | 43 | 1 chain=dstnat action=dst-nat to-addresses=172.17.0.3 to-ports=22 protocol=tcp dst-port=2022 |
| | 44 | |
| | 45 | 2 chain=dstnat action=dst-nat to-addresses=172.17.0.3 to-ports=8000 protocol=tcp |
| | 46 | dst-port=8000 |
| | 47 | |
| | 48 | 3 ;;; NAT all out traffic from containers to the wolrd |
| | 49 | chain=srcnat action=masquerade src-address=172.17.0.0/24 |
| | 50 | |
| | 51 | 4 ;;; Allow in comming 192.168.108.1:8000 to 172.17.0.3:8000 |
| | 52 | chain=dstnat action=dst-nat to-addresses=172.17.0.3 to-ports=8000 protocol=tcp |
| | 53 | dst-address=192.168.108.1 dst-port=8000 |
| | 54 | [admin@MK53] /ip/firewall/nat> |
| | 55 | }}} |
| | 56 | |
| | 57 | |