This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How disable ipv6?
#1
Hello, everyone I use TinkerOS (with CLI) and need help for full disable ipv6.
I tried to add to /etc/sysctl.conf:
# IPv6 disabled
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

and reloaded values with sysctl -p, and it's helpfull, but after system reboot I seen ipv6 addresses on interfaces again.

What I need to do for full disable IPv6?
Reply
#2
You might copy that small script and add it to /etc/rc.local. Otherwise create a systemd.service and enable it Wink
Anyway it should be better to write your configuration into /etc/sysctl.conf.d/
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#3
Yes, I tried create new file on the /etc/sysctl.d/ but it's don't have any effect... and tried add sysctl -p to rc.local too Sad
But if I connect to board via ssh and type sudo sysctl -p , - ipv6 addres disapiared on eth0 interface:

after reboot:
~$ sudo ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 172.16.246.247  netmask 255.255.255.0  broadcast 172.16.246.255
       inet6 fe80::458:3ab4:b187:fe4  prefixlen 64  scopeid 0x20<link>
       ether 88:d7:f6:c2:c5:20  txqueuelen 1000  (Ethernet)
...

~$ sudo sysctl -p
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

~$ sudo ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 172.16.246.247  netmask 255.255.255.0  broadcast 172.16.246.255
       ether 88:d7:f6:c2:c5:20  txqueuelen 1000  (Ethernet)
...
Reply
#4
But, is this only because you don't want see it on the ifconfig listing, or for a specific purpose ?

For what I'm facing , there's a small case with dnsmasq, but it doesn't create any flaw.

So if you get some issue, you might try by the systemd.service script. The script should run before any network starting.
Further investigations should take to shovel on the journal to see what sysctl doing and what is supposed to modify the behavior.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#5
I don't have IPv6 routing for this network but one of usable service (over DNS) received IPv6 address for remote host and tried used it for registration, of course without success...
And I want disable IPv6 for prohibit this.
Reply
#6
Wouldn't be better to correct that service, instead ?
I still confident that sysctl does the job, but something gets changed during the boot sequence. So it could be to impose that service to be activated at last, after the sysctl modifications. As long as we are referring to the same machine.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#7
(12-19-2018, 11:53 AM)Im4Tinker Wrote: Wouldn't be better to correct that service, instead ?

Maybe, but this service is a complete package SpyServer from AirSpy.
I added static DNS record type A on my router with only IPv4 address for this host.
Of course it's bad way but working for my situation. 
On RPi3 for disabled IPv6 have other way - create file /etc/modprobe.d/ipv6.conf with text
alias net-pf-10 off
alias ipv6 off
options ipv6 disable_ipv6=1
blacklist ipv6
but it's don't helpful for Tinkerboard too...
Reply
#8
So I thought it might be possible to add a statement to the kernel line, as it is similar with modprobe.
I found this document that says
Quote:The parameters listed below are only valid if certain kernel build options were enabled and if respective hardware is present. The text in square brackets at the beginning of each description states the restrictions within which a parameter is applicable:
Then if the kernel has that options compiled you'll be able to trap such condition.

Basically all the methods are to inform the kernel to avoid the use of IPv6. These methods are via modprobe or sysctl or kernel command line Wink

P.S. maybe you may modify the windows behavior for SpyServer.

Or maybe to use iptables to drop IP6 packets
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)