Disabling ipv6 on fresh image


I am trying to setup a site to site vpn with openwrt and an openvpn server at aws to get a testing tunnel setup between an rpi behind a consumer grade firewall to an AWS VPC for a project I am working on. Several attempts using various howtos were unsuccessful and I continue to work through that. After a few unsuccessful attempts using a fresh Raspbian image, I tried with the Openwrt factory image. I love the fact that this is a hardened stripped down purpose built image. Unfortunately, my consumer spectrum setup is handing out ipv6 addresses and no corresponding ipv4 addresses to the OpenWRT factory image, unlike the Raspbian image which gets both v4 and v6. This introduces a variety of issues. For the sake of testing and frankly usage of this product I need a reliable way of disabling ipv6 or at least ensuring I get an IPv4 addy as well or the project won't work. I tried the

uci set 'network.lan.ipv6=off'
uci set 'network.wan.ipv6=off'
uci set 'dhcp.lan.dhcpv6=disabled'
/etc/init.d/odhcpd disable
uci commit

I tried this

/sbin/sysctl -w net.ipv6.conf.all.disable_ipv6=1
/sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1

No good. I searched a bunch and just cant seem to find anything but the above two solutions which didn't work. Any help would be appreciated.

You can see if the second answer/instructions posted at superuser helps.
Look under UPDATE.

1 Like

Thanks Warlock, I went over there and just before I started, I thought I would try to login via ipv6 one more time as I wasn't getting to the web gui. Sure enough, I must have been doing something wrong, I was able to log into the ipv6 address and force ipv4 on the interface which gives me the ipv4 needed for my project. I certainly prefer having both available so this worked out for me. Thanks for your help and reply, it was really appreciated :slight_smile: have a great day

I should not have spoken so fast. ugh, back to the drawing board. I wound up with no wan if with the new image. I didn't really notice until I couldn't get off of the network. I tried restoring backups but that was all jacked up and the wan if is still missing. Then, I flashed back a fresh image and the ipv6 changed and for some reason I can't get the config page to load as the ipv6 addy changed. I am going to go back to trying to disable ipv6.