OpenWrt Forum Archive

Topic: how to disable / turn off ipv6 support in bb

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I tried the trunk build of bb, wifi seems much better on my wr841n, however I have problems with ipv6. I was not able to ssh to my router, because I got ipv6 adress only in ifconfig eth0, I don't know what ipv6 adress should I ssh to, I don't know a thing about ipv6 and to be honest I don't want to know (yet).  What is the correct way to disable ipv6? I don't want it at all, we still have plenty of ipv4 adresses in here, so most isps (including mine) do not support ipv6, so I don't need it too. Why should i rembeber adress like a week long, when I can still use those nice ipv4 adresses...

In etc/config there's

# Uncomment this line to disable ipv6 rules
        option disable_ipv6     1

Is it as simple as that? Or should I comment out wan6 interface in /etc/config/network too? Or yet another things elsewhere?

Question two: How can I compile without ipv6 support (to save flash space)? In make menuconfig I've tried to uncheck

[ ] Enable IPv6 support in packages

But to my big surprise, router stopped routing. The cause was probably this:

root@wr841n:~# /etc/init.d/firewall start
fw3: can't load library 'libip6tc.so.0'

Thank you.

(Last edited by nozombian on 21 Dec 2013, 02:36)

nozombian wrote:

Question two: How can I compile without ipv6 support (to save flash space)? In make menuconfig I've tried to uncheck

[ ] Enable IPv6 support in packages

But to my big surprise, router stopped routing. The cause was probably this:

root@wr841n:~# /etc/init.d/firewall start
fw3: can't load library 'libip6tc.so.0'

Thank you.

I would try to build everything from scratch. This means you will need to issue a make dirclean and then make.

I would try to build everything from scratch. This means you will need to issue a make dirclean and then make.

Thank you, I will try it. If i'd settle with leaving it off, what is the best way to do it? At least I can free up some ram memory. There's new thing like 6relayd, maybe more...

build everything from scratch

then try disable toolchain/uClibc/config-0.9.33.2/common
"#UCLIBC_HAS_IPV6=y"
and disable busybox ipv6 tools

(Last edited by trismo on 21 Dec 2013, 03:05)

IPv6 is probably not your problem. There's a bug in trunk right now where dnsmasq doesn't startup in the proper order and won't give out IPv4 address via DHCP. See here:

dhcp not working on first boot
https://dev.openwrt.org/ticket/14629

If you only got an IPv6 address and not an IPv4 address also then this is your problem. Disabling IPv6 is more trouble than it's worth from a compilation perspective. If you want to disable it, simply stop 6relayd from starting up:

/etc/init.d/6relayd stop
/etc/init.d/6relayd disable

adam2104 wrote:

IPv6 is probably not your problem. There's a bug in trunk right now where dnsmasq doesn't startup in the proper order and won't give out IPv4 address via DHCP. See here:

dhcp not working on first boot
https://dev.openwrt.org/ticket/14629

If you only got an IPv6 address and not an IPv4 address also then this is your problem. Disabling IPv6 is more trouble than it's worth from a compilation perspective. If you want to disable it, simply stop 6relayd from starting up:

/etc/init.d/6relayd stop
/etc/init.d/6relayd disable

Oh yes, that seems to be it, I got just the IPv6, not the IPv4. I will disable 6relayd too.

Thank you guys for help.

(Last edited by nozombian on 21 Dec 2013, 17:05)

Hi, I'd like to return to this topic. Even with option disable_ipv6 1 I have still IPv6 adresses on my interfaces. So How can I disable ipv6 dhcp assignment and ipv6 on interfaces? Even when I delete ipv6 boxes in menuconfig, ipv6 is still there, so I'd like to disable ipv6 on prebuilt image from downloads.openwrt.org.

Most people are probably trying to make ipv6 work, but I can't configure it secure and I don't want to bother with it yet, most ISPs don't support it and I don't want it too.

to build without IPV6

additional to global build switch

check IPV6 in  packages
   busybox
  network  ipv6 support
  firewall / ip6tables
  netfilter extensions / kmod-ip6tables
  odhcp6c
  6in6
   
menuconfig expansion (use "/" ) searching for ipv6 , ip6  a.s.o to find if activated ipv6 items

please submit a list what you've found / deactivated

regards
3zl

(Last edited by 3zl on 28 May 2014, 14:25)

So is there any way to completely disable IPv6 in BB? Even exclude the IPv6 kernel module (kmod-ipv6) and all packages depend on it. Or is it essential now?

--

Edit:
Okay I was able to finally disable kmod-ipv6 in menuconfig (found and disabled all the related packages). I'm building right now.

(Last edited by xypista on 30 Jul 2014, 23:36)

xypista wrote:

Edit:
Okay I was able to finally disable kmod-ipv6 in menuconfig (found and disabled all the related packages). I'm building right now.

And how you do that? please tell me

gugo wrote:

And how you do that? please tell me

So, I wasn't able to build it without the ipv6 kernel modules.
What I did first time, was disabled the

  • Global build settings\Enable IPv6 support in packages

  • Network\odhcp6c

  • Network\odhcpd (dnsmasq is there for dhcp for ipv4)

  • Kernel modules\Netfilter Extensions\kmod-ip6tables

And then it lets you to disable the kernel module:
Kernel modules\Network support\kmod-ipv6

But my build failed. Beside the default selected packages, I added luci and miniupnpd(+luci module). If I built without miniupnpd then it built, but I didn't tested the image. Apparently miniupnpd requires ipv6. From the build messages I get that it needs Libraries\Firewall\libip6tc package which is not dependant on the ipv6 kernel module (in menuconfig). So it wasn't deselected by me, but if I deselected it by hand, the build failed whatsoever.

Then I built it without disabling the kmod-ip6tables and kmod-ipv6. Then I had troubles with my PPPoE Connection.
Sometimes it disconnected and spammed this in the kernel log.
Other times it disconnected with a different message in the system log regarding ipv6 DHCP on eth1 (WAN).

Then, I rebuild again without disabling the "Enable IPv6 support in packages". So I only disabled the IPv6 DHCP server/client. I'm using that right now. I had a connection drop with some message regarding the WAN6 port, so I deleted that port and unticked the "Use builtin IPv6-management" option on both interfaces (LAN/WAN -> Advanced settings).

Now it looks good, but only half a day passed.
I'm using TP-Link TL-WR741ND v2.

(Last edited by xypista on 2 Aug 2014, 16:03)

You can build without kmod-ipv6 and odhcpd and you're good to go. Set them to "M" and you can install later if need be. No need to build entirely without IPv6 support, without kmod-ipv6 you won't have it anyways.

arokh wrote:

You can build without kmod-ipv6 and odhcpd and you're good to go. Set them to "M" and you can install later if need be. No need to build entirely without IPv6 support, without kmod-ipv6 you won't have it anyways.

And what about 'Enable IPv6  support in packages' option? I suppose that should be left on.

--

Update:
The only way to modularize kmod-ipv6 is to deselect the 'Enable IPv6  support in packages' and make the kmod-ip6tables and odhcp6c to M as well. Is that what you meant?

(Last edited by xypista on 2 Aug 2014, 16:04)

So?

Yes, modularize any dependencies.

arokh wrote:

Yes, modularize any dependencies.

Just as a note. It cannot be done without disabling the 'Enable IPv6  support in packages'. For example, If I don't disable it and enable miniupnpd then it will make the 'ip6tables' as a dependeny (Can't even M it). But if I disable the 'Enable IPv6  support in packages', the 'ip6tables' package will completely gone from the menu.

So I just built it without 'Enable IPv6  support in packages' and modularized every left ipv6 packages. I will try it soon.

(Last edited by xypista on 6 Aug 2014, 17:11)

You're right. This option is supposed to add --enable-ipv6 to supported packages, but I found that the packages I use gets built with ipv6 support anyways.

arokh wrote:

You're right. This option is supposed to add --enable-ipv6 to supported packages, but I found that the packages I use gets built with ipv6 support anyways.

But it will remove some packages as well (at least the ip6tables). Then you can't even M that package.

ip6tables will not get compiled and packaged anymore if CONFIG_IPV6 is off

Any chance we can have a generic option for IPv6-less firmware builds via ImageBuilder?

P.S. More like is the real question is whether it is worth my time to make such changes to ImageBuilder framework hoping they will be accepted in trunk. I have it working for my purposes, however making it a "general" case will require a little bit more tweaking and testing.

(Last edited by irritum on 16 Nov 2014, 10:00)

+1 for IPv6-less firmware builds via ImageBuilder.

I am trying to build a TOR-enable router firmware for TPLMR3040v2 with luci without much luck.

I tried the following

make image PROFILE=TLMR3040 PACKAGES='luci tor -libip6tc -ip6tables -kmod-ip6tables -kmod-ipv6 -busybox'

and still the image is too big for a 4MB flash.

Am I missing some packages related to IPv6 that I can 'not include'? Anyone has experience of how much space it saves to completely remove ipv6 support?

I am also aiming not to have the end user ssh into the router and do things there so should I remove busybox as well? Any other things I can 'not include'?

Removing busybox is a bad idea. You can remove opkg, odhcpd, odhcp6c, ppp, kmod-pppoe etc.

Thanks jow. I am compiling from source now. Should I get a working OpenWRT and opkg info some of the potentially 'not include' packages/ modules and check their size as a reference to the space it will take up? Can I assume any package will be smaller as I am including them in the image as they will be compressed in the squashfs?

with aa we had 1.5mb free space on 703n, with bb 1.2mb, bb should be probably called bad bad firmware

My TL-WR703N will only boot in fail safe mode if I remove all the IPv6 stuff -- am I missing something?