How to install Miredo in Puppy and achieve IPV6 connectivity

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#1 Post by Monsie »

Hi all,

There's been a lot of discussion in the last few weeks and months about IPV6 connectivity, given that we are running out of address space on the Internet whilst using the original IPV4 protocol. For those who are not up to speed on this, there are several interesting threads within the Community including: Aitch's thread here, gcmartin's thread over here, and Flash's thread right here.

Some Community members: TerryPhi, myself, and others have tried running Miredo in other distributions such as debian, Mepis, and Ubuntu, and have found that it works quite well... with some adjustments. This technology is not new. It's been around for a few years now, and in fact is based on Microsoft technology called Teredo tunneling. Given the publicity and run-up to World IPV6 launch day on June 6th, IPV6 connectivity solutions are now in the limelight...

That said, I have decided to "pick up the ball and run with it" for a bit... and this How to thread is not a complete answer but rather, it is a work in progress.... At this time, I have Miredo running in Wary Puppy 5.3 with a score of 7/10. I hope I can bring it up to 10/10 --maybe by adjusting the gateway setting... I have not tested Miredo in any other version or breed of Puppy.


System Requirements

First, recent Puppies such as: Wary/Racy, Lupu, and Slacko should come with the basic system requirements and this includes the IPV6 stack, and the tun driver. However, these modules are disabled by default. To enable them, --> /etc/rc.d/modulesconfig and edit the ADDLIST section of the text to include the line: ADDLIST='ipv6 tun' Note the space between the modules ipv6 and tun and that the single quotation marks are included. Save your changes and re-boot... you should notice that these modules are being loaded on the screen as Puppy is booting.

Second, you need the devx package for your breed of Puppy, and it needs to load on boot-up. This is easily done if you already have a frugal install or the devx package is installed on a separate partition that you can boot... I am not going to explain further here, as there is plenty of information available on how to do this.

Third, you need to download the source-code for Miredo from here. I recommend choosing Merido-1.2.4 tarball because that is what I used... and it works :wink:


Compiling the Source Code

In my home directory, I created a folder called: source-code and I extracted the downloaded file to it. You have a lot of choice here, and ./configure will pick it up... You might want to choose /tmp in case you are concerned about certain changes being made to your setup as a result of compiling the source code. Note that if things don't go quite right:

Code: Select all

cd /path/to/source-code
make uninstall
I found this worked fairly well during testing, though there was at least one directory with miredo.conf left behind after the uninstall...
Initial attempts at compiling the source code turned up some errors, but here is what worked for me --finally.

Code: Select all

cd /root/source-code/merido-1.2.4
./configure --libdir=/usr/local/lib/miredo
make check
make
make installcheck
make install
You may get an error something like: "no such file or directory" when setting the path for the libfiles. If so, --> /usr/local/lib/ and create the new folder: miredo. After this, you might have to log off and back on... or possibly even re-boot then try the ./configure step again --I remember having a bit of trouble here. Another thing that concerned me a litttle bit is that the compilation resulted in an extra miredo directory... another layer... however I'll leave it for the meantime, because the libfiles are loading, so the teredo protocol is working.

Additional adjustments and configuration

For Teredo tunneling to work, a new route is established called: iproute2 However, despite the checks during compilation, the pathway for this protocol is set incorrectly. So, --> /usr/local/etc/miredo/ and open up the script client-hook (as text) and where it says:

Code: Select all

Linux iproute2 path:
IP="/sbin/ip"
change the path to read:

Code: Select all

IP="/bin/ip"
Now you should be ready to test Miredo

Code: Select all

cd /usr/local/sbin
./miredo -f
Now go to http://www.test-ipv6.com/ and check your connectivity.

Miredo runs as two instances which you can check in Pprocess which is the process manager:-->Menu-->System-->Pprocess. The first instance is as "root", and the second instance is called "nobody". The second child process allows any user the permission needed to run Miredo. If you want to quit Miredo select each instance in Pprocess and choose "quit" or "kill" as there doesn't seem to be a command that will do so in the console. Note that Miredo must have root privileges to start with.

Lastly, rather than deal with using the command line to run Miredo, I threw a Sym-link in the Startup folder, and I found that it's pre-loading fine.

Future Considerations

I did not have to tweak any firewall settings, but that is not to say that Puppy's firewall is fully IPV6 ready. Someone with greater expertise than me should look at this.

A PET you ask... I haven't gotten that far yet... and I might need a bit of help here.... I will see how it goes.

Anyhow, for those who want to give this a go, I believe any feedback you can give could be most valuable to the Puppy Community, even if only to confirm that it works (or doesn't work) in your particular breed.

Cheers,
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#2 Post by Monsie »

Hi all,

UPDATE: I made a revised Pet. It was built and tested on Wary Puppy 5.3 only. This revision takes care of the two missing directories (path) for merido.pid See my following post.


I do not know if it will work properly in Lupu, Slacko, and other breeds... It's probably worth a try, but to be on the safe side, I would recommend compiling the source code for your particular breed of Puppy.

I fixed the pathway for iproute2 in the source code, so that is one less thing to adjust. :) I also "fixed" a problem of a missing miredo.conf file --don't know what happened there... as the package built properly on other tries.

You will still need to enable the modules for IPV6 and tun. Maybe at some point I could write a script that does this and include it with the package. You will likely want to put a Sym-link to Miredo in your Startup folder... there is no reason that I can think of why Miredo should not run in the background all of the time.

Cheers,
Monsie
Attachments
miredo-1.2.4r-i686.pet
(148.41 KiB) Downloaded 771 times
Last edited by Monsie on Mon 02 Jul 2012, 09:56, edited 1 time in total.
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#3 Post by Monsie »

Hi all,

I'm not quite sure what happened, but I "tripped and fell" with Puppy yesterday. Though I tried lots of First Aid, Puppy was not able to fully recover... :(

So... time to start fresh with a new puppy... Things were going well, and Puppy was getting settled in when I noticed an error upon starting up Miredo... from the command line.

Code: Select all

Cannot create PID file /usr/local/var/run/miredo.pid
Fortunately, there is an easy fix, and that is to create the missing directories so that the process id file for Miredo can be generated automatically... Once the Miredo.pid file is created, the program is able to run, and you are good to go.

I don't know why this error is happening now... it could be something that I missed in the source code configuration. So far, nobody has mentioned this error to me --does that mean that no news is good news? Your feedback would be appreciated.

Here is a screenshot of the error and fix that I quickly did at the terminal to get Miredo "jump started".

Monsie
Attachments
miredo-startup--error.jpg
(118.41 KiB) Downloaded 851 times
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#4 Post by jamesbond »

Monsie, if you configure miredo like this:

Code: Select all

./configure --prefix /usr --sysconfdir /etc --localstatedir /var
it will store the pid file in /var/run instead of /usr/local/var/run; and /var/run always exist so you don't have to worry about it.

By doing that, though the miredo binaries will live in /usr/bin and /usr/sbin. All you need to make a pet is to replace

Code: Select all

make install
with

Code: Select all

new2dir make install
I compiled the latest miredo (1.2.5) for Fatdog in mostly the same way, I have to change the /etc/miredo/client-hook to and change all "ip -6" to "ip -f inet6" because that's the way supported in Fatdog. But everything else is the same, and miredo works as well as you said.

But just remember that basically miredo is a proxying service; at the end of the line you need a proxy server --- and that means all your ipv6 traffic will pass through that proxy server. This may or may not be important for everyone, but it's still good to know what it is actually doing.

Good luck.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#5 Post by Monsie »

Thank you, jamesbond

I have looked at where Miredo is installed in debian, and I see it is found in /usr/sbin, /etc, and /usr/lib which is very similar to what you mentioned, so it seems standard in this case not to use the /local path.

I will definitely try your configuration options with a newer version of Miredo source code. In the meantime, I felt it was necessary to fix my pet, so I have made a revision --see my edited post above.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#6 Post by chrome307 »

Hi there

Thanks for the tutorial :)

I have attempted to follow the instructions to build this for Lucid 528, but have encounter some problems, which I am not sure how to address.

My log file is attached and I would appreciate if you have the time to look at it and give me some tips on how to correct it?

regards

chrome
Attachments
Lucid Errors.tar.gz
(5.38 KiB) Downloaded 715 times

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#7 Post by Monsie »

Hi chrome307,

What is your output when you run this command at the terminal?

Code: Select all

lsmod |grep tun
Your log indicates that you do not have the tun driver enabled in Puppy. Therefore the test of the libtun6 file package is failing. At this point in the make check routine you should get:

Code: Select all

Making check in libtun6
make[1]: Entering directory `/root/source-code/miredo-1.2.4/libtun6'
  CC     tun6.lo
  CC     diag.lo
  CCLD   libtun6.la
make  libtun6-diagnose
make[2]: Entering directory `/root/source-code/miredo-1.2.4/libtun6'
  CC     test_diag.o
  CCLD   libtun6-diagnose
make[2]: Leaving directory `/root/source-code/miredo-1.2.4/libtun6'
make  check-TESTS
make[2]: Entering directory `/root/source-code/miredo-1.2.4/libtun6'
Linux tunneling driver found.
PASS: libtun6-diagnose
=============
1 test passed
=============
This is a direct excerpt from my make check log.

So, be sure to enable the ipv6 and tun modules and re-boot in order to load them as I explained in my first post. Then your make check routine should pass the test, and you should be good to finish compiling the source code and/or creating your own pet.

Hope this helps,
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#8 Post by chrome307 »

@ Monsie

Followed the instructions in post#1 and these are the results

Image

Image

Image

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#9 Post by Monsie »

chrome307,

You do have ipv6 and tun modules loaded... excellent.

I'm looking more closely at your log file and it appears to me that your pathway to the source code is:

Code: Select all

/mnt/sda1/to build/miredo-1.2.5
That being the case, try changing your pathway to this:

Code: Select all

/mnt/sda1/to-build/miredo-1.2.5
Note the insertion of the hyphen in your directory "/to build" The space between the two words would seem to be the cause of the error: No such file or directorynFAIL

hth,
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#10 Post by chrome307 »

Image

Image

Yay Finally managed to install the application ( you were right about the empty space in the directory! ;) )and have made a pet file for this for Lucid, but can't seem to get it up and running for some reason.
You will likely want to put a Sym-link to Miredo in your Startup folder
Also when I check the ipv6test site it still gives me 0 results ..... looking at the configuration file it's using the default Meredo site as the server.

Any suggestions would be welcome :)
Attachments
miredo-1.2.4-i686.pet
Lucid 528-005 Testing Only
(161.53 KiB) Downloaded 737 times

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

#11 Post by Monsie »

chrome307,

Check your IPV6 and IPV4 fallback settings in your browser (SeaMonkey and/or Firefox).

Also, since you are running Lucid Puppy, are you using UFW as your firewall? If so, you'll need to enable ipv6

For more information, see my posts in Flash's thread right here.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#12 Post by chrome307 »

Hi Monsie

Thanks for the info ..... btw I am running Iron 19 as my browser, so am unable to follow your instructions.

Secondly, I am using the default firewall in Puppy, I went through the options for a 'custom' installation but did not see ipv6 listed ..... can you clarify?

thanks!

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#13 Post by Monsie »

Hi chrome307,

You are going to need to do some testing... I also recommend looking carefully at the details of your ipv6 connectivity test, as it should yield some clues to help point you in the right direction in terms of troubleshooting your issue(s).

AFAIK, the Linux Firewall in Puppy handles the IPV6 protocol. As I acknowledged earlier, I did not have to tweak anything or make any adjustments for Wary Puppy. That said, the firewall may not work optimally in other breeds... apparently it has been reported that the firewall does not work with IPV6 (in some cases), though I haven't found any reference to this claim yet on our Community Forum. You might consider removing the Linux firewall and installing ufw/gufw then follow my directions that I outlined in order for me to get Miredo working in debian.

I would also consider trying SeaMonkey or Firefox to see whether this makes a difference --after ensuring IPV6 support is in fact enabled within the browser. Since the Iron browser is based on Google Chrome, and Chrome apparently supports IPV6, there shouldn't be a problem except to say it might be a matter of adjusting the browser preferences. You might want to check at their Forum for any pertinent details... I have never used the Iron browser, so I cannot help you here.

Lastly, one additional tweak is to change the dns server settings on your network to those which support IPV6... I use Google Servers myself, as its connections are amongst the fastest on the Internet.

Code: Select all

DNS Parameters
Primary:  8.8.8.8
Secondary:  8.8.4.4
Good luck,
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

jamesbond
Posts: 3433
Joined: Mon 26 Feb 2007, 05:02
Location: The Blue Marble

#14 Post by jamesbond »

1. Do "modprobe ipv6" first before starting miredo.
2. Check that "IP" in "/etc/miredo/client-hook" points to the correct location ("/bin/IP" I think) --- as stated in Monsie in the first post.
3. After starting miredo, try "ping6 www.google.com". If you've got a reply, your miredo is working fine - the problem is elsewhere.
Fatdog64 forum links: [url=http://murga-linux.com/puppy/viewtopic.php?t=117546]Latest version[/url] | [url=https://cutt.ly/ke8sn5H]Contributed packages[/url] | [url=https://cutt.ly/se8scrb]ISO builder[/url]

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#15 Post by Monsie »

Hi all,

Here's some more troubleshooting information...


An alternative to modprobe is the lsmod command, hence:

Code: Select all

lsmod |grep ipv6
ipv6                  166454  14 
is the reading I get which tells me that IPV6 is enabled, how much memory it is using and how many instances or threads are running.

To confirm if the teredo protocol is working (tunneling) run:

Code: Select all

ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:10:B5:01:3B:43  
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::210:b5ff:fe01:3b43/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25334 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23184 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:17734662 (16.9 MiB)  TX bytes:3409416 (3.2 MiB)
          Interrupt:10 Base address:0x6000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:600 (600.0 B)  TX bytes:600 (600.0 B)

teredo    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet6 addr: fe80::ffff:ffff:ffff/64 Scope:Link
          inet6 addr: 2001:0:53aa:64c:38d2:5881:bd48:8b0/32 Scope:Global
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1280  Metric:1
          RX packets:6591 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6344 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:6068543 (5.7 MiB)  TX bytes:841992 (822.2 KiB)
This is my result. If you don't see teredo listed, then chances are that you still need to set the correct path for iproute2.

Lastly when pinging a server, set the number of tries for a given number, (example=4) hence my results yield:

Code: Select all

# ping6 -c 4 ipv6.google.com
PING ipv6.google.com (2001:4860:8005::6a): 56 data bytes
64 bytes from 2001:4860:8005::6a: seq=0 ttl=56 time=454.369 ms
64 bytes from 2001:4860:8005::6a: seq=1 ttl=56 time=46.538 ms
64 bytes from 2001:4860:8005::6a: seq=2 ttl=56 time=42.818 ms
64 bytes from 2001:4860:8005::6a: seq=3 ttl=56 time=42.967 ms

--- ipv6.google.com ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 42.818/146.673/454.369 ms
or hit Ctrl + C to stop the operation after a reasonable number of tries.

Hope this helps,
Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#16 Post by chrome307 »

Thank you all for the tips/suggestions, will let you know how I progress with this :)

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#17 Post by Monsie »

UPDATE:

I re-compiled Miredo for Wary Puppy 5.3.90 and tested it. Originally, I wanted to use the Pet that I made for Wary 5.3 but for some reason unknown to me, it would not work. Anyway, I changed the way I configured iproute2 by putting a sym-link in the default directory instead of changing the path as per the layout in Puppy, and it is working just fine. And so, I found this time that I did not have issues with the process id file for Miredo... it built just fine. :)

Some additional considerations...

Wary/Racy now uses SeaMonkey 2.12.1 and this means you will have to tweak at least one built-in browser setting, because the default is for SeaMonkey to fallback to ipv4 So... open a new browser tab, type in about:config and search for ipv4 Right-click with the mouse to toggle the default fallback setting to false then close the browser, re-open it and you should be good to go... :wink: Note that ipv6 settings within the browser are enabled by default.

Note that while there is a version 1.2.5 for Miredo, it cannot be used for Wary because this version is configured to use systemd and Wary does not support it. From what I've read, systemd is supported in kernel 2.6.39 and later... and apparently kernel 3 or later is recommended, so for those who want to compile Miredo 1.2.5 in Racy, then it should work okay --though I haven't tested this. Otherwise, just download the source tarball for Miredo 1.2.4 and compile it for your particular breed of Puppy.

hope this helps,
Monsie
Attachments
miredo-W5.3.90-1.2.4-i686.pet
(148.73 KiB) Downloaded 589 times
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#18 Post by Monsie »

Hi all,

I have been very busy for the past week or so, and haven't yet downloaded Wary 5.5 but I am hoping to do so in the next couple of days...

Has anyone tested my Pet for Wary 5.3.90 to see if it works in 5.5 ? I'm wondering if I should compile a new version for Wary.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

#19 Post by Monsie »

Hi all,

Update:

I am now running Wary 5.5 and starting to test it and set it up according to my preferences....

The Miredo package that I compiled in Wary 5.3.90 does work in Wary 5.5 so it appears we are good to go... At some point I may re-compile for Wary 5.5 to see (for example) if there is any noticeable difference in memory footprint or size of package.

Monsie
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

User avatar
Monsie
Posts: 631
Joined: Thu 01 Dec 2011, 07:37
Location: Kamloops BC Canada

How to install Miredo in Puppy and achieve IPV6 connectivity

#20 Post by Monsie »

Here is another Update: from the developer of Miredo:
23rd May 2013 - Miredo 1.2.6
This fixes compilation on some systems and adds locale support for simplified Han Chinese.
I have now compiled this version in Precise Puppy 5.7 retro (which replaces Wary Puppy). I believe it will also work in the "regular" version of Precise Puppy 5.7 since there is only one devx package for both... but I may be wrong in this assumption, since I haven't tested it with the newer kernel. For those who want to compile Miredo for the regular version of Precise Puppy, note that it is no longer necessary to change the path for iproute2 so you can leave the client-hook shell script as is. I am hoping that someone will test and confirm whether my Pet will work with regular Precise Puppy or not...

In Firefox or SeaMonkey, it is still necessary to disable ipv4 fallback in the browsers settings --see my previous post on this detail. I am happy to report that Miredo works with Opera v12.16 (now included with Precise Puppy) and that no browser tweaks appear to be necessary. :)

Monsie
Attachments
miredo-1.2.6-i686.pet
ipv6 connectivity for Precise Puppy 5.7
(182.62 KiB) Downloaded 241 times
My [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.

Post Reply