Skip to content

Instantly share code, notes, and snippets.

@a7md0
Created August 23, 2025 19:13
Show Gist options
  • Select an option

  • Save a7md0/eabdd3f7a64d58f6d6ece3b67f803600 to your computer and use it in GitHub Desktop.

Select an option

Save a7md0/eabdd3f7a64d58f6d6ece3b67f803600 to your computer and use it in GitHub Desktop.
Asuswrt Melin that copies IPv6 GUA from br0 interface and assign it to ppp0 interface, script placed in /jffs/scripts/wan-start
#!/bin/sh
sleep 3
BR0_IP=$(ip -6 addr show dev br0 scope global | awk '/inet6/ {print $2}' | cut -d/ -f1 | head -n 1)
logger -t "wan-start" "Interface br0 IPv6: $BR0_IP"
[ -z "$BR0_IP" ] && exit 0
logger -t "wan-start" "Reassigning br0 IPv6 to ppp0: $BR0_IP"
ip -6 addr add "$BR0_IP"/128 dev ppp0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment