162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci
362306a36Sopenharmony_ci==================================
462306a36Sopenharmony_ciIP dynamic address hack-port v0.03
562306a36Sopenharmony_ci==================================
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciThis stuff allows diald ONESHOT connections to get established by
862306a36Sopenharmony_cidynamically changing packet source address (and socket's if local procs).
962306a36Sopenharmony_ciIt is implemented for TCP diald-box connections(1) and IP_MASQuerading(2).
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciIf enabled\ [#]_ and forwarding interface has changed:
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci  1)  Socket (and packet) source address is rewritten ON RETRANSMISSIONS
1462306a36Sopenharmony_ci      while in SYN_SENT state (diald-box processes).
1562306a36Sopenharmony_ci  2)  Out-bounded MASQueraded source address changes ON OUTPUT (when
1662306a36Sopenharmony_ci      internal host does retransmission) until a packet from outside is
1762306a36Sopenharmony_ci      received by the tunnel.
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ciThis is specially helpful for auto dialup links (diald), where the
2062306a36Sopenharmony_ci``actual`` outgoing address is unknown at the moment the link is
2162306a36Sopenharmony_cigoing up. So, the *same* (local AND masqueraded) connections requests that
2262306a36Sopenharmony_cibring the link up will be able to get established.
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci.. [#] At boot, by default no address rewriting is attempted.
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci  To enable::
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci     # echo 1 > /proc/sys/net/ipv4/ip_dynaddr
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci  To enable verbose mode::
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci    # echo 2 > /proc/sys/net/ipv4/ip_dynaddr
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ci  To disable (default)::
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci     # echo 0 > /proc/sys/net/ipv4/ip_dynaddr
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ciEnjoy!
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ciJuanjo  <jjciarla@raiz.uncu.edu.ar>
41