요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
==================================
IP dynamic address hack-port v0.03
==================================
This stuff allows diald ONESHOT connections to get established by
dynamically changing packet source address (and socket's if local procs).
It is implemented for TCP diald-box connections(1) and IP_MASQuerading(2).
If enabled\ [#]_ and forwarding interface has changed:
1) Socket (and packet) source address is rewritten ON RETRANSMISSIONS
while in SYN_SENT state (diald-box processes).
2) Out-bounded MASQueraded source address changes ON OUTPUT (when
internal host does retransmission) until a packet from outside is
received by the tunnel.
This is specially helpful for auto dialup links (diald), where the
``actual`` outgoing address is unknown at the moment the link is
going up. So, the *same* (local AND masqueraded) connections requests that
bring the link up will be able to get established.
.. [#] At boot, by default no address rewriting is attempted.
To enable::
# echo 1 > /proc/sys/net/ipv4/ip_dynaddr
To enable verbose mode::
# echo 2 > /proc/sys/net/ipv4/ip_dynaddr
To disable (default)::
# echo 0 > /proc/sys/net/ipv4/ip_dynaddr
Enjoy!
Juanjo <[email protected]>
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
동적 주소 재작성
1-24이 기능은 diald ONESHOT 연결이 올라오는 동안 packet source address와 로컬 프로세스 소켓 주소를 동적으로 바꿔 최초 연결 요청이 성립하도록 합니다. TCP diald box 연결과 IP masquerading에 구현되어 있습니다.
기능이 켜져 있고 forwarding interface 주소가 바뀌면 `SYN_SENT` 상태의 재전송에서 로컬 socket과 packet source address를 다시 씁니다. Masquerade된 outbound 연결은 내부 host가 재전송할 때마다 터널에서 외부 packet을 처음 받을 때까지 output source address를 새 값으로 바꿉니다.
자동 dial-up 링크는 연결을 올리는 순간 실제 outbound 주소를 모를 수 있습니다. 동적 재작성 덕분에 링크를 깨운 바로 그 로컬 또는 masquerade 연결 요청이 새 주소로 재전송되어 계속 성립할 수 있습니다. 부팅 기본값은 재작성 비활성화입니다.
주소를 모르고 보낸 최초 SYN이 새 인터페이스 주소를 따라가는 과정입니다.
.. SPDX-License-Identifier: GPL-2.0
==================================
IP dynamic address hack-port v0.03
==================================
This stuff allows diald ONESHOT connections to get established by
dynamically changing packet source address (and socket's if local procs).
It is implemented for TCP diald-box connections(1) and IP_MASQuerading(2).
If enabled\ [#]_ and forwarding interface has changed:
1) Socket (and packet) source address is rewritten ON RETRANSMISSIONS
while in SYN_SENT state (diald-box processes).
2) Out-bounded MASQueraded source address changes ON OUTPUT (when
internal host does retransmission) until a packet from outside is
received by the tunnel.
This is specially helpful for auto dialup links (diald), where the
``actual`` outgoing address is unknown at the moment the link is
going up. So, the *same* (local AND masqueraded) connections requests that
bring the link up will be able to get established.
.. [#] At boot, by default no address rewriting is attempted.
sysctl 제어
25-40`/proc/sys/net/ipv4/ip_dynaddr`에 1을 쓰면 기능을 활성화하고, 2를 쓰면 verbose mode로 활성화합니다. 0을 쓰면 비활성화하며 이것이 기본값입니다. 문서는 Juanjo가 작성했습니다.
sysctl 값에 따른 동작입니다.
To enable::
# echo 1 > /proc/sys/net/ipv4/ip_dynaddr
To enable verbose mode::
# echo 2 > /proc/sys/net/ipv4/ip_dynaddr
To disable (default)::
# echo 0 > /proc/sys/net/ipv4/ip_dynaddr
Enjoy!
Juanjo <[email protected]>
요약·해설
ip_dynaddr.rst:1-40링크를 깨운 최초 연결이 예전 또는 미정 source 주소 때문에 실패하지 않도록 재전송 시점에 실제 interface 주소로 보정하는 기능입니다.