I wrote some solutions in regard with udhcpc, which is a dhcp client in busybox. But it was not best solution and the problem that internal network connection is renewed every release time still happened. 

My current version of OpenWRT(kamikaze) is 8.09.1. It has still same problem. This problem occurs because the OpenWRT uses the MASQUERADE by default for NAT as regarding my searching(https://forum.openwrt.org/viewtopic.php?id=6434). 
It could solve the problem partly using SNAT. The following script inserts in "/etc/udhcpc.user" and restart the network(/etc/init.d/network restart).

#!/bin/bash

echo 'Custom SNAT (disabling default MASQUERADE which drops connections on every DHCP renewal)'
/usr/sbin/iptables -t nat -F zone_wan_nat
/usr/sbin/iptables -t nat -I zone_wan_nat -o "$interface" -j SNAT --to-source "$ip"
 
신고
이전 1 다음

티스토리 툴바