All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
IPv6 dhclient auto-configuration script (Online.net)
A friend created this and I think it's pretty handy and clean for those of us with multiple servers at Online:
ipv6-dhclient-script
Simple IPv6 configuration script for Debian (Ubuntu...) and RedHat (CentOS, Fedora...) based distros, mainly for Online.net servers but valid for any network that provides IPv6 access through prefix delegation i.e. the static address is configured by the client and an identifier (DUID) is sent to the DHCP server in order to get functional routes.
Servers provided by Online.net won't come with IPv6 enabled by default so this makes things a bit easier specially when owning multiple servers and IPv6 needs to be enabled by hand in each one.
The script has been successfully tested under:
- Ubuntu Server 14.04
- Debian 7.0
- CentOS 7.0
Just run the script and follow the instructions:
$ bash ipv6-dhclient-script.sh
You can also pass parameters straight away:
$ bash ipv6-dhclient-script.sh <interface> <address block> <subnet> <duid>
Comments
I love you.
Can anyone test with RHEL 6?
Does this work with the 2EUR "Dedibox kidéchire" ?
I can't figure out how to get an address block.
Yes
You can request it from the console.
Do you actually get the whole /48 or just one IP address?
The entire /48 can be used if you wish. It can be broken into /56 and /64 allocations too though for use across multiple servers.
If you try to add more IPs one by one, by doing something like
They'll turn off your server after the ~6000th request for packet flood.
I see, but there is no restriction on what can be used in the /48 etc.
What if you rate limit it?
When I tested it I waited for 0.4s per request.
Script author here, couldn't share by myself since LET sign up was broken (not anymore) so thanks to Nyr.
Recently one guy reported that it kind of worked with Proxmox and OVZ, check this issue out for instructions: https://github.com/outime/ipv6-dhclient-script/issues/1
duid ?!
what is the that? will you give us example plz
After requesting your IPv6 block under Server->Network configuration, you should find your block and the associated DUID in there. It's recommended that you subnet the main /48 into different /56 for each server. Note that every /56 will have a different DUID.
Thanks for the script, worked great for me. I'd suggest having the script assign at least a single IPv6 address by default.
I wrote a short blog post on the script with an example for people who aren't sure what information to enter:
https://www.sonicboxes.com/online-net-ipv6-script/
Your DUID is your password for assigning IPv6 to your server; i'd black it out if I were you
@nunim besides what the guy above me says, you have this in your instructions:
wget www.sonicboxes.com/scripts/ipv6_dhclient_online_net.sh chmod 755 deluge_webui.sh ./ipv6_dhclient_online_net.sh <interface> <address block> <subnet> <duid>
I recommend the following:
Link to the original script: https://raw.githubusercontent.com/outime/ipv6-dhclient-script/master/ipv6-dhclient-script.sh (so it's a bit more trusted content and will always contain the latest version)
Fix the chmod file name
Thanks for the post!
I caused a dhcp flood the last time I tried configuring ipv6 with dhclient on my dedibox. is this script likely to cause dhcp flood? shall I filter out egress in any way? I'm wary of annoying online.net staff again.
I missed this post, sorry. IIRC it'd only cause flooding if for example your DUID is incorrect since it'll keep trying.
Not sure about dhclient, but the WIDE DHCPv6 client sometimes goes crazy on its own: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765453
So yes in any case filtering would not hurt. With WIDE I now use:
Someone complained about the default interface being incorrect when using CentOS. Since the interface name was hardcoded, it's true that it might not fit in some setups. I've updated the script to offer a more suitable default interface if none is specified in the arguments.
Just posting this in case someone else had this issue.
ipv6-dhclient-script.sh: line 4: syntax error near unexpected token
newline' ipv6-dhclient-script.sh: line 4:
<!DOCTYPE html>'Hello, if someone can help.
I have kidechire and I'm trying to configure ipv6. I'm running Ubuntu 15.10 x64
I tried with their support page
https://documentation.online.net/en/serveur-dedie/reseau/ipv6-prefix
I get
Client Critical Fatal error during CfgMgr initialization.
I tried with
https://version6.ru/en/online.net-wide-dhcpv6
When starting it exists with error 1.
I tried with
https://github.com/outime/ipv6-dhclient-script
I got error eth0 is not found.
Tried even this
https://tech.tiq.cc/2015/10/how-to-enable-ipv6-on-online-net-servers-using-dhclient-on-ubuntu-14-04/
same error eth0 not found.
Can anyone give me advice how to add ipv6 to existing or new interface?
There are 2 interfaces, enp2s0 and enp3s0, but I don't know what is enp3s0.
Ifconfig output
enp2s0 Link encap:Ethernet HWaddr c8:0a:a9:xx:xx:xx
inet addr:195.154.xx.xx Bcast:195.154.xx.xx Mask:255.255.255.0
inet6 addr: fe80::ca0a:a9ff:fef1:a6d9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:550360 errors:0 dropped:0 overruns:0 frame:0
TX packets:730668 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:118344582 (118.3 MB) TX bytes:1009066158 (1.0 GB)
Interrupt:30 Memory:feae0000-feb00000
Anybody have an idea how to fix it?
Thanks for the script! I used to use the dibbler client.
Had to run it twice for it to work, on first run I got failed for some reason (after second time I had duplicates in the config).
Also I managed to kill connectivity for a sec cause I am dumb \o/
It may not have been your intention but it's not nice to steal someone else's script. It's available and probably maintained at the location in the first post.
I'm still having "fun" with IPv6. Dedi is kidechire, distro is Ubuntu 15.10 x64.
I'm running ipv6-dhclient-script
https://github.com/outime/ipv6-dhclient-script
This is my ipv6 network info
This is output of script.
This is what ifconfig enp3s0 returns
Any help will be appreciated.
example:
test:
centos7.2 of Online.net is running perfect.
Add to my hw7.net , thanks to the original author
Can we uninstall this script without reinstalling the entire OS?
I had to reformat my kide a couple of times due to networking and again, last time I assigned my entire /48 to the kide.