1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun================================== 4*4882a593SmuzhiyunIP dynamic address hack-port v0.03 5*4882a593Smuzhiyun================================== 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThis stuff allows diald ONESHOT connections to get established by 8*4882a593Smuzhiyundynamically changing packet source address (and socket's if local procs). 9*4882a593SmuzhiyunIt is implemented for TCP diald-box connections(1) and IP_MASQuerading(2). 10*4882a593Smuzhiyun 11*4882a593SmuzhiyunIf enabled\ [#]_ and forwarding interface has changed: 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun 1) Socket (and packet) source address is rewritten ON RETRANSMISSIONS 14*4882a593Smuzhiyun while in SYN_SENT state (diald-box processes). 15*4882a593Smuzhiyun 2) Out-bounded MASQueraded source address changes ON OUTPUT (when 16*4882a593Smuzhiyun internal host does retransmission) until a packet from outside is 17*4882a593Smuzhiyun received by the tunnel. 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunThis is specially helpful for auto dialup links (diald), where the 20*4882a593Smuzhiyun``actual`` outgoing address is unknown at the moment the link is 21*4882a593Smuzhiyungoing up. So, the *same* (local AND masqueraded) connections requests that 22*4882a593Smuzhiyunbring the link up will be able to get established. 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun.. [#] At boot, by default no address rewriting is attempted. 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun To enable:: 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun # echo 1 > /proc/sys/net/ipv4/ip_dynaddr 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun To enable verbose mode:: 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun # echo 2 > /proc/sys/net/ipv4/ip_dynaddr 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun To disable (default):: 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun # echo 0 > /proc/sys/net/ipv4/ip_dynaddr 37*4882a593Smuzhiyun 38*4882a593SmuzhiyunEnjoy! 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunJuanjo <jjciarla@raiz.uncu.edu.ar> 41