banner
miaoer

miaoer

喵二の小博客 https://www.miaoer.xyz xLog 分站
tg_channel
telegram
bilibili

How to use Cattools: Demonstration of specific functions and operations

This article explains some of the more difficult-to-understand steps for using Cattools. You can refer to my configuration method to help players find the correct way to open Cattools!

1

Error#

Major Update Error#

This error usually occurs when the Cattools version has undergone a major update, and you need to re-enter cattools to try again. If it happens again the second time, it may also be because the author submitted a version with a bug, and you need to provide feedback for a fix.

root@CatWrt:~# cattools
Please wait for the cattools to be updated.
cattools updated successfully.

/usr/bin/cattools: line 119: syntax error near unexpected token `;;'
/usr/bin/cattools: line 119: `        ;;'
root@CatWrt:~# cattools
Please wait for the cattools to be updated.
cattools updated successfully.


----------------------------------------------------------
                         CatTools                         
        https://www.miaoer.xyz/posts/blog/cattools        
----------------------------------------------------------
1. SetIP                                  -  Set IP
2. Network_Wizard                         -  Network Wizard
3. Apply_repo                             -  Software Source Configuration
4. Diagnostics                            -  Network Diagnostics
5. Debug                                  -  Capture Logs
6. Catwrt_update                          -  Check for Updates
7. Sysupgrade                             -  System Update
8. Restore                                -  Restore Packages
9. Utilities(more)                        -  Utilities
0. Exit                                   -  Exit
----------------------------------------------------------
Please enter a number and press Enter: 

Offline Mode#

Cattools supports running in offline mode, but to avoid network failures causing Cattools updates to fail, it will retry three times.

Attempt 1 failed. Retrying...
Attempt 2 failed. Retrying...
Attempt 3 failed. Retrying...

Unable to download the latest version, continue to use the current offline version.

Currently, there is a bug in the Cattools network wizard when used offline. If the command is interrupted during the update, it may cause Cattools to be lost. This has been fixed in the latest version, but there is no clue for the integrated offline mode in the system. It is recommended not to interrupt Cattools during the update process in offline mode.

To Begin With#

In CatWrt, we follow Lean's LEDE default network ports: ETH0 is for LAN, ETH1 is for WAN, and other ports are unbound.

Cattools has optimized operations for multiple network ports in the network wizard. You can set ETH0 as the WAN port connected to the optical modem or upstream router, while the other ports are all LAN, regardless of how many ports you plug in.

If you need to activate the Cattools bypass gateway configuration, the device must have a single network port.

Network Wizard#

You can follow the steps in the network wizard here. If you are using a DHCP upstream optical modem, you can directly press Enter to go online. If you want to customize it, you can follow the Cattools wizard.

Please enter a number and press Enter: 2



[Step1] Do you want Network Wizard? /// Do you want to use the network wizard? ([Enter] to confirm / [0] to exit): 

[Step3] CatWrt default IP is 192.168.1.4 /// Default CatWrt IP is 192.168.1.4
Do you want to change the IP address? ([Enter] to keep default / [0] to customize): 
[INFO] Keeping default IP address: 192.168.1.4

[Step4] IPv6 is enabled by default /// IPv6 is enabled by default
Do you want to disable IPv6? ([Enter] to skip / [1] to disable): 

[Step5] Default connection mode is DHCP /// Default mode is DHCP
Do you want to perform PPPoE dial-up? ([Enter] to continue DHCP / [1] to PPPoE dial-up): 

[Step6] Use recommended DNS servers 223.6.6.6 119.29.29.99?
 /// Do you want to use the recommended DNS servers 223.6.6.6 119.29.29.99? ([Enter] to confirm / [0] to skip): 

[Step7] Do you want to change the DHCP IP pool range? (default: 30-200)
 /// Do you want to change the available IP range? (default: 30-200, press [Enter] to confirm / [1] to customize): 

[Step8] Enable DHCP force /// Enabling DHCP force can avoid issues with AP assigning addresses in the LAN
Do you want to enable forced DHCP mode? ([Enter] to confirm, press [1] to skip): 
[INFO] Forced DHCP mode has been enabled

[Step9] Enable UPNP by default /// UPNP is enabled by default, which can improve BT/P2P software connectivity, but clients may be vulnerable to rogue software abusing P2P networks, causing abnormal upstream bandwidth!
Do you want to enable UPNP? ([Enter] to confirm, press [1] to skip): 
[INFO] UPNP has been enabled

[Step10] Configure network interfaces /// Configure network ports

 Wan    LAN1    LAN2    LANX      ...
 eth0   eth1    eth2    ethX    ...
      ...

Press [Enter] to configure network interfaces, press [1] to skip
 /// [Enter] to confirm configuration of network ports, press [1] to skip: 

[Step10] Detected multiple network interfaces /// Detected multiple network ports
[Step10] Network interfaces configured: WAN (ETH0), LAN (eth1 eth2 eth3) /// Network ports configured: WAN (ETH0), LAN (eth1 eth2 eth3)

[INFO] Ready to reboot CatWrt!

Bypass Gateway#

[Step2] Detected a single network interface /// Detected a single network port
Do you want to set up a bypass gateway? ([Enter] to confirm / [0] to skip bypass setup):

[Step3] Please enter the main router's IP address (e.g., 192.168.31.1): 192.168.31.1

[Step4] Local IP address is 192.168.31.4, press Enter to confirm, or enter a new IP address:

INFO    ========================
Main router IP address: 192.168.31.1
Local (bypass gateway) IP address: 192.168.31.4

[Step5] Use recommended DNS servers 223.6.6.6 119.29.29.99?
 /// Do you want to use the recommended DNS servers 223.6.6.6 119.29.29.99? ([Enter] to confirm / [0] to skip): 


[INFO] If a Warning appears, it is because the bypass firewall reports this way; some configurations can be ignored without affecting usage.

Configure Software Sources#

Please enter a number and press Enter: 3

INFO    =================================================================
The software sources are purely free to share, but you can use free overseas software sources for hosting. If you need faster speeds, please use the main site.
I do not guarantee all software; we do not provide third-party commercial services, and the risks of use must be borne by yourself.
You need to agree to the CatWrt software source user agreement. Please confirm whether to continue. (Press [Ctrl]+[C] to cancel within 10 seconds)
============================================================================
Please select the software source to use:
1) repo.miaoer.xyz    (Main Site)
2) Github-Pages
3) Cloudflare-Netlify
4) Netlify
5) Cloudflare-Vercel
6) Vercel             (Default)
Please enter your choice /// Please enter your choice (1-5): 1
To sponsor us and obtain a support code, please visit the link: https://www.miaoer.xyz/sponsor
We will use the user-supported fees to continue maintaining CatWrt and the blog.
Please enter the support code: vme50
[INFO] Using https://mirror.ghproxy.com/https://raw.githubusercontent.com/miaoermua/cattools/main/repo/amd64/distfeeds.conf
Downloading https://repo.miaoer.xyz/targets/x86/64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://repo.miaoer.xyz/x86_64/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://repo.miaoer.xyz/x86_64/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://repo.miaoer.xyz/x86_64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://repo.miaoer.xyz/x86_64/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://repo.miaoer.xyz/x86_64/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
[INFO] Software source configuration is complete. You can install plugins/components/kernel modules via opkg install pkg!

----------------------------------------------------------
                         CatTools                         
        https://www.miaoer.xyz/posts/blog/cattools        
----------------------------------------------------------
1. SetIP                                  -  Set IP
2. Network_Wizard                         -  Network Wizard
3. Apply_repo                             -  Software Source Configuration
4. Diagnostics                            -  Network Diagnostics
5. Debug                                  -  Capture Logs
6. Catwrt_update                          -  Check for Updates
7. Sysupgrade                             -  System Update
8. Restore                                -  Restore Packages
9. Utilities(more)                        -  Utilities
0. Exit                                   -  Exit
----------------------------------------------------------
Please enter a number and press Enter: 0
Exiting...
Done!
root@CatWrt:~# opkg install nano
Package nano (7.2-2) installed in root is up to date.

If your software source has no errors and is already connected to the internet, you can proceed with the installation directly.

2

Tailscale#

tailscale background: https://login.tailscale.com/admin/machines

Please enter a number and press Enter: 9

      Configure more features from here!
=============================

......
2.    Tailscale Configuration
......

0.    Return to Cattools Main Menu

Please enter a number and press Enter: 2
[INFO] tailscale has been installed
[INFO] Downloading configuration...
[INFO] Starting configuration for tailscale, please log in to tailscale to bind the device

To authenticate, visit:

        https://login.tailscale.com/a/84565de01b15a

[INFO] tailscale has successfully logged in and bound the device
[INFO] Tailscale configuration part, the rest is up to you~
[INFO] You need to bind the tailscale interface: http://192.168.1.4/cgi-bin/luci/admin/network/iface_add
[INFO] CatTools - tailscale configuration blog: https://www.miaoer.xyz/posts/blog/cattools-step

Visit: http://192.168.1.4/cgi-bin/luci/admin/network/iface_add (default: 192.168.1.4 if you haven't changed it, everything is based on Cattools)

Add the following configuration:

New interface name: tailscale

New interface protocol: Static (default)

Include the following interfaces: Ethernet adapter: tailscale0

Submit Next

Interface - TAILSCALE

IPv4 address: Enter the CatWrt address from the tailscale management background (e.g., 100.115.146.76, which is obviously not in our internal network segment)

IPv4 subnet mask: 255.0.0.0

Save Next

Interface - TAILSCALE - Firewall Settings

Create/assign firewall zone: LAN

Save and Apply

tailscale official website - Manage Devices - catwrt - Edit - Disable key expiry

image

catwrt - Edit - Edit route settings...

image

Until the CatWrt labels Expiry, disabledSubnets, and Exit Node all appear without any exclamation marks.

This article was synchronized and updated by Mix Space to xLog. The original link is https://www.miaoer.xyz/posts/blog/cattools-step

Footnotes#

  1. https://www.miaoer.xyz/posts/blog/cattools

  2. https://www.miaoer.xyz/posts/network/catwrt-applist

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.