Welcome! Log In Create A New Profile

Advanced

tailscale .deb packages for armel?

Posted by davygravy 
tailscale .deb packages for armel?
November 28, 2021 11:35AM
I currently run tailscale on a(n extra) pogoplug w/ entware, works fine.

I'd rather run it on the same pogoplug host were my PiHole server resides - ie. using a debian package for tailscale.

Anyone out there successfully built this on armel, or for armel using toolchain?

=====================================================



Edited 1 time(s). Last edit at 11/28/2021 06:34PM by davygravy.
Re: tailscale dpk packages?
November 28, 2021 05:03PM
Hi davygravy ,

Off-topic, but just want to say the rescue system looks great (I've read the documentation on your GitHub), but I have not found enough free time to install yet. I'm saving it for the Xmas break :) will try it with as many Kirkwood boards as I can.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: tailscale dpk packages?
November 29, 2021 10:15PM
Good to hear, @bodhi.

RE tailscale, I found this: https://github.com/tailscale/tailscale/issues/676

Using this as a template, I was able to cross compile tailscale and tailscaled on my Bullseye desktop build box pretty quickly (albeit perhaps a bit clumsily - this is the first time I'd built anything w/ go-lang, and I didn't have all of the env variables set correctly, so I had to manual pull in the dependencies- arg.). The resulting binaries do run on my pogoplug debian/pihole server.

A bunch of work needs to be done to make this scriptable/repeatable with no hiccups, and to produce .deb packages. A couple things:
  • need go-lang 1.17 (per https://github.com/tailscale/tailscale/commit/ec2b7c7da63ca1d0b9c128d381fcf63b65471999) or later (Bullseye has 1.15, so I uninstalled it and installed from source instead, v 1.17.4)
  • Debian has some tools, in the mold of dh-make, that can aid in the packaging of go-language based packages
  • right now, tailscale is undergoing a lot of development and major tweaking - functionality is changing relatively rapidly, so they are going to new major versions freqently.
  • IF the package is in demand...it would be nice to have this set up for an autobuild system...
  • I'm not sure how many folks use tailscale... when traveling I find it essential

=================

further notes 11/30/2021

tailscale has iptables (not nftables) as a runtime dependency, so ...
apt install iptables
and then execute tailscaled
./tailscaled 
logtail started
Program starting: v1.18.1-date.20211101, Go 1.17.3: []string{"./tailscaled"}
LogID: 7f4577b5d4d3ad66e876c82807a57c8c613f6bab9dd9a2575c72dff8a04a6183
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
logtail: dialed "log.tailscale.io:443" in 282ms
router: v6nat = true
dns: [rc=unknown ret=direct]
dns: using *dns.directManager
link state: interfaces.State{defaultRoute=eth0 ifs={eth0:[192.168.11.5/24]} v4=true v6=false}
magicsock: disco key = d:3a6e7b3dcea76f9d
Creating wireguard device...
Bringing wireguard device up...
Bringing router up...
external route: up
Clearing router settings...
Starting link monitor...
Engine created.
monitor: RTM_NEWROUTE: src=, dst=ff00::/8, gw=, outif=5, table=255
monitor: RTM_NEWROUTE: src=, dst=fe80::/64, gw=, outif=5, table=254
monitor: RTM_NEWROUTE: src=, dst=fe80::3617:b351:febb:bc05/128, gw=, outif=5, table=255
netmap packet filter: (not ready yet)
Start
using backend prefs
created empty state for "_daemon": Prefs{ra=true dns=true want=false routes=[] nf=on Persist=nil}
got initial portlist info in 0s
control: HostInfo: {"IPNVersion":"1.18.1-date.20211101","BackendLogID":"7f4577b5d4d3ad66e876c82807a57c8c613f6bab9dd9a2575c72dff8a04a6183","OS":"linux","OSVersion":"Debian 11.0 (bullseye); kernel=5.2.9-kirkwood-tld-1","DeviceModel":"Pogoplug v4","Hostname":"PiHole7C6E","GoArch":"arm","Services":[{"Proto":"tcp","Port":22,"Description":"sshd [listener] 0 of 10-100 startups"},{"Proto":"tcp","Port":53,"Description":"pihole-FTL"},{"Proto":"tcp","Port":80,"Description":"lighttpd"},{"Proto":"tcp","Port":2812,"Description":"monit"}]}
Backend: logs: be:7f4577b5d4d3ad66e876c82807a57c8c613f6bab9dd9a2575c72dff8a04a6183 fe:
Switching ipn state NoState -> NeedsLogin (WantRunning=false, nm=false)
blockEngineUpdates(true)
wgengine: Reconfig: configuring userspace wireguard config (with 0/0 peers)
wgengine: Reconfig: configuring router
wgengine: Reconfig: configuring DNS
dns: Set: {DefaultResolvers:[] Routes:{} SearchDomains:[] Hosts:0}
control: authRoutine: state:new; goal=nil paused=false
health("overall"): error: state=NeedsLogin, wantRunning=false
dns: Resolvercfg: {Routes:{} Hosts:0 LocalDomains:[]}
control: mapRoutine: state:new
dns: OScfg: {Nameservers:[] SearchDomains:[] MatchDomains:[]}

So tailscaled is running. This will need an initscript and/or service/systemd infrastructure added... but the important stuff seems to be happening:
root@PiHole7C6E:~# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.11.5  netmask 255.255.255.0  broadcast 192.168.11.255
        inet6 fe80::225:31ff:fe05:7c6e  prefixlen 64  scopeid 0x20<link>
        ether 00:25:31:05:blahblah  txqueuelen 1000  (Ethernet)
        RX packets 123102  bytes 86099982 (82.1 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16554  bytes 2046106 (1.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 36  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 61597  bytes 5337870 (5.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 61597  bytes 5337870 (5.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tailscale0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1280
        inet6 fe80::3617:b351:febb:bc05  prefixlen 64  scopeid 0x20<link>
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 500  (UNSPEC)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 384 (384.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Also, something for "tailscale up" will have to be added so that stuff happens automagically at boot. And verifying that...

root@PiHole7C6E:/# ./tailscale up

To authenticate, visit:

	https://login.tailscale.com/a/3e0b4caeblahblah

Which worked as expected yielding : "Success"

So, it works as expected, though I want to test it with a few more flags for "advertise routes" and "accept routes".
====================

further... it seems to work.

On a linux host, to enable IP forwarding for subnets in tailscale, they have some documentation : https://tailscale.com/kb/1104/enable-ip-forwarding/

So putting that together, and assuming that tailscaled is running and forwarding for subnet routing, we want commands:
echo 1 > /proc/sys/net/ipv4/ip_forward
echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
Note that you'd probably want to use some sort of the "tee" form shown in their docs to make it persist after reboots ...

And then to make it work as a subnet router:
./tailscale up --advertise-routes 192.168.11.0/24 --accept-routes

And maybe the (a?) pearl inside this mess is: https://tailscale.com/kb/1114/pi-hole/

=====================================================



Edited 8 time(s). Last edit at 12/09/2021 12:41PM by davygravy.
Re: tailscale .deb packages for armel?
December 05, 2021 10:56PM
Hi,

I'm running tailscale on my PogoV4.

It's on 5.15 kernel and debian Strecth.

I'm trying use their provided arm binary (https://pkgs.tailscale.com/stable/)

==> arm: tailscale_1.18.1_arm.tgz

It's running with that binary and not installed, just run the command.

The problem I'm facing is when I close this terminal, it's exit the service.

Anyone know how to install on this device?

Command run:

root@debian:~/tailscale_1.18.1_arm# ./tailscaled --state=tailscaled.state
logtail started
Program starting: v1.18.1-

root@debian:~/tailscale_1.18.1_arm# ./tailscale up --advertise-exit-node

To authenticate, visit:

	https://login.tailscale.com/a/8b54

Success.


Btw,
Info from Tailscale contact, their application can be installed on arm devices. Here are quote from their response.

Quote
Yes, the ARM version supports the same feature set as x86

Still not successfully install with apt source list below:

# Tailscale packages for debian stretch
deb https://pkgs.tailscale.com/stable/debian stretch main

Here are the error:

root@debian:~# apt-get update && apt-get upgrade
Hit:2 http://security.debian.org stretch/updates InRelease                                                                
Ign:3 http://ftp.us.debian.org/debian stretch InRelease                                             
Hit:4 http://ftp.us.debian.org/debian stretch Release     
Hit:1 http://cdn-fastly.deb.debian.org/debian stretch-updates InRelease
Fetched 5535 B in 42s (129 B/s)             
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-armel/Packages' as repository 'https://pkgs.tailscale.com/stable/debian stretch InRelease' doesn't support architecture 'armel'
Reading package lists... Done
Building dependency tree       
Reading state information... Done

If anyone know how to resolve this issue, please let me know or know .deb package for arm devices, Plase help ....
Re: tailscale .deb packages for armel?
December 08, 2021 11:25AM
alphaprime Wrote:
-------------------------------------------------------
> Hi,
>
> I'm running tailscale on my PogoV4.
>
> It's on 5.15 kernel and debian Strecth.

For future-proofing your device, you may want to upgrade your distro to Bullseye... but that's another issue.


> I'm trying use their provided arm binary
> (https://pkgs.tailscale.com/stable/)
>
> ==> arm: tailscale_1.18.1_arm.tgz
>
I've checked these binaries also, and yes to do function.

> It's running with that binary and not installed,
> just run the command.
>
> The problem I'm facing is when I close this
> terminal, it's exit the service.
Try:

tailscaled & disown
# note: this simply detaches the tailscaled process from the terminal instance and directs it to run in the background...
# not a complete solution. It should probably log its output to somewhere that makes sense (/var/log/tailscaled.log or some such), and
# record a pid to /var/run/ or somewhere like that.

>
> Anyone know how to install on this device?
>
locations:

/usr/sbin/tailscaled
/usr/bin/tailscale
/etc/default/tailscaled # default settings for tailscaled

TTBOMK, /lib/systemd/system/tailscale.service would not be needed on our debian armel boxes with bodhi's rootfs, since we aren't using the systemd/systemctl setup (consumes a lot of resources for an embedded-type device).

tailscaled should run as a daemon and perhaps log to something like /var/log/tailscale.log. I think default settings have it running as such:
/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port 41641. The port is mentioned in /etc/default/tailscaled, and I think that --state and --socket are complied in from source.

So, what is missing still?

1. /etc/init.d/tailscaled # state the daemon, logging, pid, handle any arguments
2. some script to bring up tailscale w/ whatever arguments/options that you want.


> Command run:
>
>
> root@debian:~/tailscale_1.18.1_arm# ./tailscaled
> --state=tailscaled.state
> logtail started
> Program starting: v1.18.1-
> 
> root@debian:~/tailscale_1.18.1_arm# ./tailscale up
> --advertise-exit-node
> 
> To authenticate, visit:
> 
> 	https://login.tailscale.com/a/8b54
> 
> Success.
>
>
>
> Btw,
> Info from Tailscale contact, their application can
> be installed on arm devices. Here are quote from
> their response.
>
>
Quote
Yes, the ARM version supports the same
> feature set as x86

>

Saying "ARM" is pretty generic. Their statement seems to be true, since it runs fine on other boxes, routers, etc. and functions there just as it does on 64bit intel boxes. They actually never say __which__ ARM architectures are supported by their builds. There are many. Our Kirkwood is "armel", which is ARMv5 Little Endian. They are only building for ARMv7 and newer ARM processors.

>
>
> Still not successfully install with apt source
> list below:
>
>
> # Tailscale packages for debian stretch
> deb https://pkgs.tailscale.com/stable/debian
> stretch main
>
>
> Here are the error:
>
>
> root@debian:~# apt-get update && apt-get upgrade
> Hit:2 http://security.debian.org stretch/updates
> InRelease                                         
>                       
> Ign:3 http://ftp.us.debian.org/debian stretch
> InRelease                                         
>    
> Hit:4 http://ftp.us.debian.org/debian stretch
> Release     
> Hit:1 http://cdn-fastly.deb.debian.org/debian
> stretch-updates InRelease
> Fetched 5535 B in 42s (129 B/s)             
> Reading package lists... Done
> N: Skipping acquire of configured file
> 'main/binary-armel/Packages' as repository
> 'https://pkgs.tailscale.com/stable/debian stretch
> InRelease' doesn't support architecture 'armel'

That says it right there   ...  doesn't support architecture 'armel'

> Reading package lists... Done
> Building dependency tree       
> Reading state information... Done
>
>
> If anyone know how to resolve this issue, please
> let me know or know .deb package for arm devices,
> Plase help ....

I am working on this but don't have any timeline, as I have other jobs ongoing.

=====================================================



Edited 1 time(s). Last edit at 12/08/2021 05:10PM by davygravy.
Re: tailscale .deb packages for armel?
December 08, 2021 10:51PM
At the bottom of https://pkgs.tailscale.com/stable/ where they have a link to the arm binary file they state:

Quote
If you use these files, please also let us know your distro at info@tailscale.com, so that we can consider supporting it directly.

So perhaps you should send email requesting the provide a debian armel package.
Re: tailscale .deb packages for armel?
December 09, 2021 07:11AM
I contacted DGentry several weeks ago regarding this, but will follow up using the email address that you pointed out. Thanks for the pointer. I’d missed that somehow.

PS. Email has been sent.

--------------------------

After further checking, I now remember something more:

CentOS 6 support was dropped because it did not support systemd/systemctl :
Quote

It doesn't run systemd, so we'd have to write and support legacy sysvinit scripts, and reimplement missing functionality like automatic restarts. CentOS 6 is the only distro in our current list that would need this.
Details are here:
https://github.com/tailscale/tailscale/issues/315

Many years ago I created a rootfs tarball using (IIRC) chroot, qemu and other... that was pretty much all Debian armel from the official package feed... and systemd seemed to make it slower than I could (rationally) tolerate - a lot of resources were gobbled up by systemd.


Additionally, there is the already mentioned https://github.com/tailscale/tailscale/issues/676#issuecomment-869029372 .

Notably, Entware is the only instance of Tailscale packages for embedded-profile machines that I can find.


In summation, it looks like we'd have to create our own /etc/init.d/tailscaled script and a script to tailscale-up at the appropriate time.

=====================================================



Edited 2 time(s). Last edit at 12/09/2021 11:16AM by davygravy.
Re: tailscale .deb packages for armel?
December 09, 2021 05:54PM
Hi davygravy,

Thank you for your help. I'll try to do your advice.

There are a lot of details step, I'll check them.

When I'm encounter any issue, I'll post here.

Thank you.

davygravy Wrote:
-------------------------------------------------------
> alphaprime Wrote:
> -------------------------------------------------------
> > Hi,
> >
> > I'm running tailscale on my PogoV4.
> >
> > It's on 5.15 kernel and debian Strecth.
>
> For future-proofing your device, you may want to
> upgrade your distro to Bullseye... but that's
> another issue.

Yes, this is on my plan list. Thanks

>
> > I'm trying use their provided arm binary
> >
> (https://pkgs.tailscale.com/stable/)
> >
> > ==> arm: tailscale_1.18.1_arm.tgz
> >
> I've checked these binaries also, and yes to do
> function.
>
> > It's running with that binary and not
> installed,
> > just run the command.
> >
> > The problem I'm facing is when I close this
> > terminal, it's exit the service.
> Try:
>
> tailscaled & disown
> # note: this simply detaches the tailscaled
> process from the terminal instance and directs it
> to run in the background...
> # not a complete solution. It should probably log
> its output to somewhere that makes sense
> (/var/log/tailscaled.log or some such), and
> # record a pid to /var/run/ or somewhere like
> that.

> >
> > Anyone know how to install on this device?
> >
> locations:
>
> /usr/sbin/tailscaled
> /usr/bin/tailscale
> /etc/default/tailscaled # default settings for
> tailscaled
>
> TTBOMK, /lib/systemd/system/tailscale.service
> would not be needed on our debian armel boxes with
> bodhi's rootfs, since we aren't using the
> systemd/systemctl setup (consumes a lot of
> resources for an embedded-type device).
>
> tailscaled should run as a daemon and perhaps log
> to something like /var/log/tailscale.log. I think
> default settings have it running as such:
> /usr/sbin/tailscaled
> --state=/var/lib/tailscale/tailscaled.state
> --socket=/run/tailscale/tailscaled.sock --port
> 41641. The port is mentioned in
> /etc/default/tailscaled, and I think that --state
> and --socket are complied in from source.
>
> So, what is missing still?
>
> 1. /etc/init.d/tailscaled # state the daemon,
> logging, pid, handle any arguments
> 2. some script to bring up tailscale w/ whatever
> arguments/options that you want.


Thank you for your advice, I'll look into this.

>
> > Command run:
> >
> >
> > root@debian:~/tailscale_1.18.1_arm#
> ./tailscaled
> > --state=tailscaled.state
> > logtail started
> > Program starting: v1.18.1-
> > 
> > root@debian:~/tailscale_1.18.1_arm# ./tailscale
> up
> > --advertise-exit-node
> > 
> > To authenticate, visit:
> > 
> > 	https://login.tailscale.com/a/8b54
> > 
> > Success.
> >
> >
> >
> > Btw,
> > Info from Tailscale contact, their application
> can
> > be installed on arm devices. Here are quote
> from
> > their response.
> >
> >
Quote
Yes, the ARM version supports the same
> > feature set as x86

> >
>
> Saying "ARM" is pretty generic. Their statement
> seems to be true, since it runs fine on other
> boxes, routers, etc. and functions there just as
> it does on 64bit intel boxes. They actually never
> say __which__ ARM architectures are supported by
> their builds. There are many. Our Kirkwood is
> "armel", which is ARMv5 Little Endian. They are
> only building for ARMv7 and newer ARM processors.

>
> >
> >
> > Still not successfully install with apt source
> > list below:
> >
> >
> > # Tailscale packages for debian stretch
> > deb https://pkgs.tailscale.com/stable/debian
> > stretch main
> >
> >
> > Here are the error:
> >
> >
> > root@debian:~# apt-get update && apt-get
> upgrade
> > Hit:2 http://security.debian.org
> stretch/updates
> > InRelease                                       
>  
> >                       
> > Ign:3 http://ftp.us.debian.org/debian stretch
> > InRelease                                       
>  
> >    
> > Hit:4 http://ftp.us.debian.org/debian stretch
> > Release     
> > Hit:1 http://cdn-fastly.deb.debian.org/debian
> > stretch-updates InRelease
> > Fetched 5535 B in 42s (129 B/s)             
> > Reading package lists... Done
> > N: Skipping acquire of configured file
> > 'main/binary-armel/Packages' as repository
> > 'https://pkgs.tailscale.com/stable/debian
> stretch
> > InRelease' doesn't support architecture 'armel'
> 
> That says it right there   ...  doesn't support
> architecture 'armel'


Yes, they didn't have repo for armel arch.
So they advice the steps to install the binary manually


> 
> > Reading package lists... Done
> > Building dependency tree       
> > Reading state information... Done
> >
> >
> > If anyone know how to resolve this issue,
> please
> > let me know or know .deb package for arm
> devices,
> > Plase help ....
>
> I am working on this but don't have any timeline,
> as I have other jobs ongoing.

Please take your time, in the mean time I'm using binary packages....
You can share update whenever you have time...

Thank you.


###########################

Update:

I've contacted tailscale, and they inform below steps to install the binary on my PogoV4.
I've try this and it works.



Hello,

It looks like you may need to do a manual installation. In your tailscale_1.18.1_arm folder, run these commands:

sudo mkdir -p /etc/default /etc/systemd/system
sudo mv systemd/tailscaled.defaults /etc/default/tailscaled
sudo mv systemd/tailscaled.service /etc/systemd/system
sudo mv tailscale /usr/bin/tailscale
sudo mv tailscaled /usr/sbin/tailscaled
sudo systemctl daemon-reload
sudo systemctl enable --now tailscaled

This will install Tailscale on your system (the same way that the debian package would) and enable it to automatically start on boot. After a moment or two run this command to see if Tailscale is running:

sudo systemctl status tailscaled

It should say something along the lines of Active: active (running). Then you can use sudo tailscale up to login as normal. I would also suggest rebooting the device at least once to ensure that Tailscale will come back up when you reboot.

You can repeat those install directions in the future for when you need to upgrade Tailscale, just use sudo systemctl restart tailscaled instead of the systemctl enable command.

Hope this helps. Be well,

Even this is not ideal setup, but it works.
I'll use this binary until found suitable packages for specific armel arch.

Regards,



Edited 1 time(s). Last edit at 12/09/2021 06:12PM by alphaprime.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: