BACKGROUND - HOW I DISABLE IPv6
CLICK HERE TO SHOW
I compile my own OpenWRT 18.06 (current trunk is a bit unstable) for my TP-W8970 v1.
With make menuconfig
I remove/unset:
-
Global build settings
>Enable IPv6 support in packages
-
Base system
>busybox
>Networking Utilities
>Enable IPv6 support
(to be shown this needCustomize busybox options
to be set) -
Kernel modules
>Netfilter Extensions
>kmod-nf-ipt6
-
Libraries
>Firewall
>libip6tc
-
Network
>odhcpd-ipv6only
-
Network
>odhcpd
(should be unset by default if I remember correctly)
That should be everything right? There are always some "leftovers" so I remove them after a flash:
- Remove some IPv6 addresses inside
/etc/hosts
(that are no more recognized ofc) - Remove
option ula_prefix
from/etc/config/network
(and all the other IPv6 related settings I can find) - Remove the
wan6
interface (with LUCI) - Remove IPv6 related rules fom firewall (with LUCI)
- Remove IPv6 addresses from
/etc/config/uhttpd
- Remove IPv6 forwarding settings from
/etc/sysctl.d/10-default.conf
After this (just to be sure/paranoid) I:
- Add
option ipv6 '0'
after eachoption proto
inside/etc/config/network
- Add
option disable_ipv6 '1'
to/etc/config/firewall
defaults
THE PROBLEM
CLICK HERE TO SHOW
Today I run ps
on the router and saw some funny stuff about the running pppd process, so I run
cat /proc/<pppd pid>/cmdline | tr "\0" " "
And get
/usr/sbin/pppd nodetach ipparam wan ifname pppoa-wan set PEERDNS=0 nodefaultroute usepeerdns maxfail 1 user ******** password ******** ip-up-script /lib/netifd/ppp-up ipv6-up-script /lib/netifd/ppp6-up ip-down-script /lib/netifd/ppp-down ipv6-down-script /lib/netifd/ppp-down mtu 1478 mru 1478 plugin pppoatm.so 0.8.35 vc-encaps
As you can see, the cmdline include:
-
ipv6-up-script /lib/netifd/ppp6-up
(different script/file thanip-up-script
) -
ipv6-down-script /lib/netifd/ppp-down
(same script/file asip-down-script
)
I checked and /lib/netifd/ppp6-up
exist. How is the pppd started? If it's from a script, can I edit it and simply remove ipv6-up-script /lib/netifd/ppp6-up
and ipv6-down-script /lib/netifd/ppp-down
from the cmdline?
ANOTHER MINOR PROBLEM (unrelated to IPv6 but related to pppd)
CLICK HERE TO SHOW
With LUCI I edited the wan interface and chose to ignore advertised DNS by ISP, and replaced them with 1.1.1.1 and 1.0.0.1.
Looking again at the pppd cmdline I can see both PEERDNS=0
and usepeerdns
as parameters. From the LUCI overview page the ISP DNS are properly ignored and replaced. usepeerdns
seems useless, and (from it's name) it exactly seems what I do not want, should I remove it? And how?
UPDATE/EDIT
Added noipv6
to /etc/ppp/options
, reboot, but nothing changed.