6to4 support with 1:1 nat
Username: bolvan
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=472
One-to-one NAT means you have LAN address on interface and its mapped 1:1 to external ip addresses.
You can have incoming connections.
In such configuration “ipaddr” must be specified in 6to4 protocol section.
But due to bug this addr is submitted as local address for tunnel creation.
It does not work.
I fixed this with the following patch to /lib/netifd/proto/6to4.sh
48,53c48,53
< [ -z “$ipaddr” ] && {
< if ! network_get_ipaddr ipaddr “$wanif”; then
< proto_notify_error “$cfg” “NO_
WAN
_ADDRESS” < return
< fi
< }
—
if ! network_get_ipaddr ipladdr “$wanif”; then
proto_notify_error “$cfg” “NO_
WAN
_ADDRESS”
return
fi
[ -z “$ipaddr” ] && ipaddr=$ipladdr
76c76
< json_add_string local “$ipaddr”
—
json_add_string local “$ipladdr”
I suggest you integrate this patch or do something similar yourself.