728x90

회사 내부 네트워크에서 회사내에 있는 가상 PC의 윈도우 터미널에 접속이 되지 않아 라우터의 설정을 좀 찾아보았습니다.

찾아보니 NAT Hairpin에 대한 설명을 찾을 수 있었고, WinBox에서 NAT Rule을 설정하는 방법을 찾아서 적용해 보았습니다.

아래는 EdgeRouter 매뉴얼에서 NAT Hairpin 을 설명한 글입니다.

 

일반적으로 NAT 포트 포워딩 룰은 *네트워크 바깥*에서 *네트워크 안*으로 hostname 또는 라우터의 퍼블릭 주소를 통해서 사용됩니다. 하지만 같은 로컬 네트워크 내의 로컬 서버의 주소는 더 사용하기 쉬운 NAT 헤어핀이 적용됩니다. 예를 들어, 사용자의 랩탑과 메일 서버가 같은 로컬 네트워크 내에 있는 경우, 혼란을 피하기 위해서 같은 로컬 내트워크 내에 있을 때나 그렇지 않을 때나 같은 서버명을 사용하기를 선호할 것입니다.

 

아래는 NAT Hairpin 설정 절차 예제입니다.

이 설정은 요약하자면 내부에서 외부 네트워크를 거쳤다가 다시 내부 네트워크로 접속하게 하는 것입니다.

 

I solved the problem. 

8)

 Fewi, thanks for your hints mate!

/1. Services hairpin to .10
     chain=dstnat action=dst-nat to-addresses=192.168.10.10 protocol=tcp 
     dst-address=!192.168.10.0/24 dst-address-type=local 
     dst-port=80,21
/2. NAT all traffic from local to internet
     chain=srcnat action=masquerade src-address=192.168.10.0/24 
     out-interface=WAN 
/3. NAT all traffic from local to local
     chain=srcnat action=masquerade protocol=tcp src-address=192.168.10.0/24 
     dst-port=80,21 

 192.168.10.0/24 is the local network segment.
192.168.10.10 is the local IP of the WEB/FTP server
There are TWO rules to be added, 1. and 3. above. Rule 2 is also necessary and is the well known rule which provides NAT for the local clients to the internet.
Rule 1. hairpinning, helped with the client's packet to reach the server. Rule 3. is for the server's response to reach back the local client.

I hope this will be helpful to others and I also hope in the near future this is documented in under wiki or in the user manual to become common knowledge to the user. 

:-|

 

 

위의 IP 주소에서 내부 IP 대역을 써주시면 됩니다. 참고되시길 바랍니다.

 

https://wiki.mikrotik.com/wiki/Hairpin_NAT

https://forum.mikrotik.com/viewtopic.php?f=13&t=36548#p179950

https://docs.buf4.com/edgemax/edgerouter-configuration/_204952134-EdgeRouter-NAT-Hairpin-Nat-Inside-to-Inside-Loopback-Reflection-.html

http://www.2cpu.co.kr/bbs/board.php?bo_table=QnA&wr_id=384899

728x90

'용어' 카테고리의 다른 글

thin client   (0) 2011.03.14
기간계/계정계/정보계/대외계  (0) 2011.03.10
웹 서버와 WAS(Web Application Server)의 정의  (0) 2010.08.19
JEUS의 DB 연결  (0) 2010.07.28
ISV (independent software vendor)  (0) 2010.06.03

+ Recent posts