{"id":669,"date":"2009-06-01T01:10:13","date_gmt":"2009-06-01T07:10:13","guid":{"rendered":"http:\/\/gregsowell.com\/?p=669"},"modified":"2009-05-09T20:22:54","modified_gmt":"2009-05-10T02:22:54","slug":"mikrotik-nat-ftp-to-same-ip-as-masquerade","status":"publish","type":"post","link":"https:\/\/gregsowell.com\/?p=669","title":{"rendered":"Mikrotik NAT FTP to same IP as Masquerade"},"content":{"rendered":"<p><figure id=\"attachment_677\" aria-describedby=\"caption-attachment-677\" style=\"width: 742px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/gregsowell.com\/wp-content\/uploads\/2009\/05\/mtkftpnat.jpg\" alt=\"MTK FTP NAT\" title=\"mtkftpnat\" width=\"742\" height=\"304\" class=\"size-full wp-image-677\" srcset=\"https:\/\/gregsowell.com\/wp-content\/uploads\/2009\/05\/mtkftpnat.jpg 742w, https:\/\/gregsowell.com\/wp-content\/uploads\/2009\/05\/mtkftpnat-300x122.jpg 300w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><figcaption id=\"caption-attachment-677\" class=\"wp-caption-text\">MTK FTP NAT<\/figcaption><\/figure>The idea is that you have a single public IP on your Mikrotik.  You want to grab anyone on the internet heading to your IP for FTP and redirect them to an internal FTP server.<\/p>\n<p>The first thing you want to do is disable the FTP server on the Mikrotik.<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">ip service disable ftp<\/code><\/pre>\n<p>Next, you need to redirect port 20 and 21 to your internal FTP server.  The public facing interface is named &#8220;outside&#8221;.  The public IP bound to the router is 1.1.1.1.  The private internal IP of the FTP server is 192.168.1.11.<\/p>\n<pre class=\"gs-code\"><code class=\"language-plaintext\">chain=dstnat action=netmap to-addresses=192.168.1.11 to-ports=21 protocol=tcp src-address=0.0.0.0\/0 dst-address=1.1.1.1 in-interface=outside dst-port=21 \r\nchain=dstnat action=netmap to-addresses=192.168.1.11 to-ports=20 protocol=tcp src-address=0.0.0.0\/0 dst-address=1.1.1.1 in-interface=outside dst-port=20<\/code><\/pre>\n<p>As you can see I use chain dstnat and action of netmap.  I also specified incoming interface.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The idea is that you have a single public IP on your Mikrotik. You want to grab anyone on the internet heading to your\u2026<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,8],"tags":[],"class_list":["post-669","post","type-post","status-publish","format-standard","hentry","category-mikrotik","category-networking"],"_links":{"self":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=669"}],"version-history":[{"count":9,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/669\/revisions"}],"predecessor-version":[{"id":679,"href":"https:\/\/gregsowell.com\/index.php?rest_route=\/wp\/v2\/posts\/669\/revisions\/679"}],"wp:attachment":[{"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gregsowell.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}