{"id":2857,"date":"2021-01-31T12:22:58","date_gmt":"2021-01-31T03:22:58","guid":{"rendered":"https:\/\/mooa.net\/ap\/?p=2857"},"modified":"2021-02-18T12:46:15","modified_gmt":"2021-02-18T03:46:15","slug":"macos-port-forwarding-smb-%ec%84%9c%eb%b2%84-%ec%84%a4%ec%a0%95","status":"publish","type":"post","link":"https:\/\/mooa.net\/ap\/2857","title":{"rendered":"MacOS port forwarding &#8211; SMB \uc11c\ubc84 \uc124\uc815"},"content":{"rendered":"<p>MacOS \uc5d0 \ud30c\uc77c \uacf5\uc720 \uae30\ub2a5, SMB\uc11c\ubc84 \uc124\uc815\uc744 \ud588\uc744 \ub54c \uc678\ubd80\uc5d0\uc11c\ub3c4 \uc811\uc18d\uac00\ub2a5\ud558\uac8c \ud558\ub294 \ubc29\ubc95\uc774\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>\ub9ce\uc774 \ubc1b\ub294 \uc9c8\ubb38 \uc911\uc5d0 \ud558\ub098\uac00<\/p>\n<p>&#8220;smb \uc11c\ubc84\uac00 \ud68c\uc0ac\ub0b4\ub098 \uc13c\ud130 \ub0b4\uc5d0\uc11c\ub294 \uc811\uc18d\uc774 \uc798 \ub418\ub294\ub370<\/p>\n<p>\uc678\ubd80\uc5d0\uc11c\ub294 \uc811\uc18d\uc774 \uc548 \ub418\uc694 &#8221; \ub77c\ub294 \uc9c8\ubb38\uc774\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>\uadf8 \uc774\uc720\ub294 SMB \uc11c\ube44\uc2a4\uc6a9 port\uac00 \ud1b5\uc2e0\uc0b0\/ISP (Internet Service Provider)\ub4e4\uc5d0 \uc758\ud574 \ub9c9\ud600 \uc788\uc5b4\uc11c\ub2e4.<\/p>\n<p>\uadf8\ub798\uc11c \ub9c9\ud600 \uc788\ub294 445 port \ub300\uc2e0 \ub2e4\ub978 port \ub97c \ud1b5\ud574\uc11c request\ub97c \ubc1b\uace0,<\/p>\n<p>\ubc1b\uc740 request\ub97c \uc11c\ube44\uc2a4 port\ub85c forwarding(redirection) \ud574\uc8fc\ub294 \uc124\uc815\uc774 \ud544\uc694\ud558\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>\uc544\ub798 \uadf8\ub9bc\uc740 MacOS\uc5d0\uc11c port forwarding(redirection) \uc744 \uc124\uba85\ud558\ub294 \uadf8\ub9bc\uc774\ub2e4.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2859\" src=\"https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding-1024x566.png\" alt=\"\" width=\"960\" height=\"531\" srcset=\"https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding-1024x566.png 1024w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding-300x166.png 300w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding-150x83.png 150w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding-768x424.png 768w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding-1536x849.png 1536w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/port_forwarding.png 1614w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>request\ub97c \ubcf4\ub0b4\ub294\ucabd\uc5d0\uc11c 11111 port\ub85c request\ub97c \ubcf4\ub0b4\uace0<\/p>\n<p>SMB Server\uac00 \uc11c\ube44\uc2a4\ud558\ub294 445 port\ub85c request\ub97c forwarding \ud574\uc11c \uc11c\ube44\uc2a4\uac00 \uac00\ub2a5\ud558\ub3c4\ub85d \uc124\uc815\ud55c\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n<p>\uc124\uc815 \uc801\uc6a9\uc21c\uc11c\ub97c \uc544\ub798\uc640 \uac19\ub2e4.<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>\uc11c\ube44\uc2a4 \uc81c\uacf5\uc911\uc778 Network interface \ud655\uc778<\/li>\n<li>port redirection rule \uc124\uc815 (<span data-token-index=\"0\" data-reactroot=\"\">\/etc\/pf.anchors\/smb.forwarding)<\/span><\/li>\n<li>redirection rule \uc744 anchor\ub85c \uc9c0\uc815\ud558\uace0 anchor\ub97c load\ud558\ub294 config \uc124\uc815 (\/etc\/pfctl-smb-config.conf)<\/li>\n<li>config\ub97c \uc77d\uc5b4\uc11c \uc2e4\ud589 (rule \ud65c\uc131\ud654)<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h3><\/h3>\n<p>&nbsp;<\/p>\n<h3>1. \ub124\ud2b8\uc6cc\ud06c interface \ud655\uc778<\/h3>\n<p><code>$ ifconfig<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2858\" src=\"https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/ifconfig-1024x263.png\" alt=\"\" width=\"960\" height=\"247\" srcset=\"https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/ifconfig-1024x263.png 1024w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/ifconfig-300x77.png 300w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/ifconfig-150x39.png 150w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/ifconfig-768x197.png 768w, https:\/\/mooa.net\/ap\/wp-content\/uploads\/2021\/01\/ifconfig.png 1082w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3>2. port redirection rule \uc124\uc815<\/h3>\n<p><code><span data-token-index=\"0\" data-reactroot=\"\">$ sudo vi \/etc\/pf.anchors\/smb.forwarding<\/span><\/code><\/p>\n<p>\uc785\ub825 \ub0b4\uc6a9<\/p>\n<p><code><span data-token-index=\"0\" data-reactroot=\"\">rdr pass on en0 inet proto tcp from any to xxx.xxx.xxx.xxx port 11111 -&gt; xxx.xxx.xxx.xxx port 445<\/span><\/code><\/p>\n<p>&nbsp;<\/p>\n<h3>3. anchor load config. \uc124\uc815<\/h3>\n<p><code><span data-token-index=\"0\" data-reactroot=\"\">$ sudo vi \/etc\/pfctl-smb-config.conf<\/span><\/code><\/p>\n<p>\uc785\ub825 \ub0b4\uc6a9<\/p>\n<p><code><span data-token-index=\"0\" data-reactroot=\"\">rdr-anchor \"forwarding\" <\/span><\/code><\/p>\n<p><code><span data-token-index=\"0\" data-reactroot=\"\">load anchor \"forwarding\" from \"\/etc\/pf.anchors\/smb.forwarding\"<\/span><\/code><\/p>\n<p>&nbsp;<\/p>\n<h3>4. rule \ud65c\uc131\ud654<\/h3>\n<p><code><span spellcheck=\"false\" data-token-index=\"0\" data-reactroot=\"\">$ sudo pfctl -ef \/etc\/pfctl-smb-config.conf<\/span><\/code><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\uc774\uc81c \ubd80\ud130\ub294 \ud574\ub2f9 SMB\uc11c\ubc84\ub97c mount \ud574\uc11c \uc0ac\uc6a9\ud560 \ub54c \uc544\ub798\ucc98\ub7fc 11111 port\ub85c \uc5f0\uacb0\ud574\uc11c \uc0ac\uc6a9\ud558\uba74 \ub41c\ub2e4.<\/p>\n<p>Finder \ud30c\uc778\ub354\uc5d0\uc11c command+[k] \ub204\ub974\uace0<\/p>\n<p>smb:\/\/xxx.xxx.xxx.xxx:11111 \uc785\ub825<\/p>\n<p>&nbsp;<\/p>\n<p>\uc774\uc0c1 MacOS SMB\uc11c\ubc84\uc758 port forwarding\uc744 \uc704\ud55c \uc124\uc815 \ubc29\ubc95\uc774\ub2e4.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MacOS \uc5d0 \ud30c\uc77c \uacf5\uc720 \uae30\ub2a5, SMB\uc11c\ubc84 \uc124\uc815\uc744 \ud588\uc744 \ub54c \uc678\ubd80\uc5d0\uc11c\ub3c4 \uc811\uc18d\uac00\ub2a5\ud558\uac8c \ud558\ub294 \ubc29\ubc95\uc774\ub2e4. &nbsp; \ub9ce\uc774 \ubc1b\ub294 \uc9c8\ubb38 \uc911\uc5d0 \ud558\ub098\uac00 &#8220;smb \uc11c\ubc84\uac00 \ud68c\uc0ac\ub0b4\ub098 \uc13c\ud130 \ub0b4\uc5d0\uc11c\ub294 \uc811\uc18d\uc774 \uc798 \ub418\ub294\ub370 \uc678\ubd80\uc5d0\uc11c\ub294 \uc811\uc18d\uc774 \uc548 \ub418\uc694 &#8221; \ub77c\ub294 \uc9c8\ubb38\uc774\ub2e4. &nbsp; \uadf8 \uc774\uc720\ub294 SMB \uc11c\ube44\uc2a4\uc6a9 port\uac00 \ud1b5\uc2e0\uc0b0\/ISP (Internet Service Provider)\ub4e4\uc5d0 \uc758\ud574 \ub9c9\ud600 \uc788\uc5b4\uc11c\ub2e4. \uadf8\ub798\uc11c \ub9c9\ud600 \uc788\ub294 445 port \ub300\uc2e0 \ub2e4\ub978 port \ub97c \ud1b5\ud574\uc11c request\ub97c \ubc1b\uace0, \ubc1b\uc740 request\ub97c \uc11c\ube44\uc2a4 port\ub85c forwarding(redirection) \ud574\uc8fc\ub294 \uc124\uc815\uc774 \ud544\uc694\ud558\ub2e4. &nbsp; \uc544\ub798 \uadf8\ub9bc\uc740 MacOS\uc5d0\uc11c port forwarding(redirection) \uc744 \uc124\uba85\ud558\ub294 \uadf8\ub9bc\uc774\ub2e4. &nbsp; request\ub97c \ubcf4\ub0b4\ub294\ucabd\uc5d0\uc11c 11111 port\ub85c request\ub97c \ubcf4\ub0b4\uace0 SMB Server\uac00 \uc11c\ube44\uc2a4\ud558\ub294 445 port\ub85c request\ub97c forwarding \ud574\uc11c \uc11c\ube44\uc2a4\uac00 \uac00\ub2a5\ud558\ub3c4\ub85d \uc124\uc815\ud55c\ub2e4. &nbsp; \uc124\uc815 \uc801\uc6a9\uc21c\uc11c\ub97c \uc544\ub798\uc640 \uac19\ub2e4. \uc11c\ube44\uc2a4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2859,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[546,547,544,545,541,542,543],"_links":{"self":[{"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/posts\/2857"}],"collection":[{"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/comments?post=2857"}],"version-history":[{"count":5,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/posts\/2857\/revisions"}],"predecessor-version":[{"id":2869,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/posts\/2857\/revisions\/2869"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/media\/2859"}],"wp:attachment":[{"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/media?parent=2857"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/categories?post=2857"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mooa.net\/ap\/wp-json\/wp\/v2\/tags?post=2857"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}