What's new

Cloudflared Tunnel in RT-AC68U

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

tracked

New Around Here
Hi,

I have an old RT-AC68U that does not support wireguard. I don't have experience with other VPN. So as a work around was thinking of using Cloudflared tunnel. Cloudflare already provides the binary for arm and it appears to work but I don't know how to go about starting and using it.

I have not been able to find info about this here but I have found instructions in openwrt post so not sure how to do it in Merlin or if it's even possible.


I have downloaded the Cloudflared binary after SSH and that's about it.

I have gone over the User-script post but my skills are very limited. https://github.com/RMerl/asuswrt-merlin.ng/wiki/User-scripts
 
Hi! Brighter minds than mine might have corrections, but I modified the instructions from your link and they worked for me on my RT-AX86U.

Prerequisites:
- I'm assuming you already have an entware partition set up
- Create the tunnel on Cloudflare and grab your token from the setup instructions (the ones that start with cloudflared service install)

1. SSH into your router

2. Download the cloudflared binary:

(Note: I replaced the version from the instructions with the latest version as of writing)

Bash:
VERSION="2024.5.1"

curl -O -L \
  https://github.com/cloudflare/cloudflared/releases/download/${VERSION}/cloudflared-linux-arm \
&& chmod +x cloudflared-linux-arm \
&& mv cloudflared-linux-arm /opt/bin/cloudflared

3. Set up the init script

Bash:
touch /opt/etc/init.d/S99cloudflared
chmod +x /opt/etc/init.d/S99cloudflared

4. Set up the init script (don't forget to replace this part with your unique cloudflared token)

Bash:
cat >> /opt/etc/init.d/S99cloudflared << EOF
#!/bin/sh
ENABLED="yes"
PROCS="cloudflared"
ARGS="--no-autoupdate tunnel run --token $REPLACE_WITH_YOUR_CLOUDFLARED_TOKEN_HERE_FIRST"
WORK_DIR=""
DESC=$PROCS
PREARGS=""
PRECMD=""
POSTCMD=""
. /opt/etc/init.d/rc.func
EOF

5. Enable and test

Bash:
/opt/etc/init.d/S99cloudflared start
/opt/etc/init.d/S99cloudflared check

Hope this helps!
 
Last edited:
NOTE: While the above instructions *do* work, I've had issues with the cloudflared daemon staying up. I'm open to suggestions on improving upon my instructions, but in the meantime proceed with caution while I figure out an updated solution.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top