Zarif2000 Posted August 29, 2023 Posted August 29, 2023 Hello. I faced with a problem, I can't disable ipv6 completely on Armbian 23.05.1. Orange Pi PC. Tried to use armbian-config to disable ipv6 in Network menu, but no luck, apps can use it at the moment netstat -tulpn | grep ::: gives me udp6 0 0 :::53 :::* 1134/pihole-FTL udp6 0 0 :::111 :::* 1/init Thanks in advance. 0 Quote
TRS-80 Posted August 31, 2023 Posted August 31, 2023 I disable it at my router (which is running OpenWrt). 0 Quote
Zarif2000 Posted August 31, 2023 Author Posted August 31, 2023 (edited) 8 часов назад, TRS-80 сказал: I disable it at my router (which is running OpenWrt). My ISP doesn't provide ipv6. And also I user ip6tables and configured default policies on Armbian: ip6tables -P INPUT DROP ip6tables -P OUTPUT DROP ip6tables -P FORWARD DROP But I can't find out how to disable it completely. I tried to add these lines to sysctl net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1 not working! Next idea is to disable ipv6 via grub. But there is no /etc/default/grub file on Armbian. Edited August 31, 2023 by Zarif2000 0 Quote
hexdump Posted September 1, 2023 Posted September 1, 2023 i think "ipv6.disable=1" added to the kernel cmdline should work 0 Quote
Zarif2000 Posted September 12, 2023 Author Posted September 12, 2023 (edited) 01.09.2023 в 19:38, hexdump сказал: i think "ipv6.disable=1" added to the kernel cmdline should work Can you provide step-by-step guide please? Should I edit /boot/armbianEnv.txt ? Edited September 12, 2023 by Zarif2000 0 Quote
Solution MichaIng Posted September 12, 2023 Solution Posted September 12, 2023 (edited) sudo sed -i '/^extraargs=/$/ ipv6.disable=1/' /boot/armbianEnv.txt Respectively add ipv6.disable=1 to the end of the "extraargs" line, separated with a space from other possible values. However, this disables IPv6 support completely kernel-wise, which some software has problems with. E.g. the default Apache2 config on Debian comes with a vhost which dynamically binds to IPv4 and/or IPv6 addresses based on whether it is active on the interface or not. This syntax requires the kernel to at least understand IPv6, otherwise the webserver fails to start. So it is generally safer to only disable IPv6 on all interfaces, but keeping the kernel module active: echo -e 'net.ipv6.conf.all.disable_ipv6=1\nnet.ipv6.conf.default.disable_ipv6=1' | tee /etc/sysctl.d/disable_ipv6.conf sudo sysctl -p /etc/sysctl.d/disable_ipv6.conf EDIT: Ah, now I see you basically tried this already. As this is universally functional on all Linux distros, it must actually work. Not sure how exactly to tried it, which exact command or config file? E.g. using the sysctl command itself is not boot-persistent, hence the config file. Edited September 12, 2023 by MichaIng 0 Quote
Zarif2000 Posted September 18, 2023 Author Posted September 18, 2023 31.08.2023 в 09:33, Zarif2000 сказал: I tried to add these lines to sysctl As I was telling earlier, I used sysctl file. 12.09.2023 в 19:37, MichaIng сказал: E.g. the default Apache2 config on Debian comes with a vhost which dynamically binds to IPv4 and/or IPv6 addresses based on whether it is active on the interface or not. Sounds logical. And as far as I don't want to face with strange errors in a future, I'll let ipv6 in normal state. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.