banner
miaoer

miaoer

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

How to use Cattools specific function demonstration operation

This article discusses 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

Help#

Firmware support is not perfect, and bugs are inevitable. If you encounter problems, please leave a comment below or join the group to ask. If you are using my firmware, you can ask for simple advice; if it's paid, that would be even better. I won't respond if you're using someone else's firmware!

Feel free to leave messages of encouragement ( ´・・) ノ (._.`)

Errors#

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 a second time, it may be because the author submitted a version with a bug, and you need to report it to me 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.net/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 an update, it may cause Cattools to be lost. This has been fixed in the latest version, but there is no clue for the offline mode already integrated into the system. It is recommended not to interrupt Catools 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, allowing ETH0 to be set 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.

::: gallery
1
2
:::

Network Wizard#

Just follow the steps in the network wizard. If you are using a DHCP upstream optical modem that can directly connect to the internet, just press Enter to proceed. 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 /// The 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 network? ([Enter] to skip / [1] to disable): 

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

[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 range): 

[Step8] Enable DHCP force /// Enabling DHCP force can avoid issues with AP assigning addresses in the local area network.
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 are easily abused by rogue software using P2P networks, leading to 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!

After execution, the system will reboot. If you cannot connect to the router's backend after rebooting or it affects normal internet access, please reboot again to obtain the address normally.

Bypass Gateway#

[Step2] Detected a single network interface /// Detected a single network port
Do you want to set up 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] The 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 and will not affect usage."

Configure Software Sources#

For repo.miaoer.xyz, we have set up support codes (passwords) that need to be obtained at https://www.miaoer.net/sponsor to support us.

Essentially, it is a gentleman's agreement because the server maintenance costs are high. If you are not very concerned about speed, you can use mirror sites to help us reduce traffic costs.

Your support fees will be used 100% for the development of CatWrt and its peripherals.

Please enter a number and press Enter: 3

INFO    =================================================================
The software source is purely free sharing, but you can use free overseas software source 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.net/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.net/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 connected to the internet, you can directly proceed with the installation.

2

Tailscale#

Tailscale backend: 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 Tailscale configuration, 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.net/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 modified it, everything is based on Cattools)

Add the following configuration:

New interface name: tailscale

New interface protocol: Static (default)

Include the following interface: Ethernet adapter: tailscale0

Submit Next step

Interface - TAILSCALE

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

IPv4 subnet mask: 255.0.0.0

Save Next step

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... Check all

image

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

Import IPK Packages#

This method allows you to import and install third-party compiled IPK files without obtaining them through software sources. If you connect to the software source, it may resolve some component dependency issues.

Supports importing IPK/URL such as: https://mirrors.pku.edu.cn/immortalwrt/releases/23.05.3/packages/x86_64/packages/pv_1.6.6-1_x86_64.ipk

Please enter a number and press Enter: 9

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

1.    Mihomo Configuration
2.    Tailscale Configuration
3.    LeigodAcc Configuration
4.    TTYD Password-Free Configuration (Dangerous)
5.    Import IPK Packages
6.    SSL/TLS Certificate Upload Configuration
7.    Reset root password
8.    Reset system

0.    Return to Cattools Main Menu

Please enter a number and press Enter: 5

[INFO] Checking for IPK files in the /tmp/upload/ directory...
[INFO] File upload access link: http://10.0.0.4/cgi-bin/luci/admin/system/filetransfer
[INFO] You can import IPK files for installation via IPK file/URL
Please enter the IPK file path or multiple URLs (separated by commas ',') without using Chinese commas ',': https://mirrors.pku.edu.cn/immortalwrt/releases/23.05.3/packages/x86_64/packages/pv_1.6.6-1_x86_64.ipk
[INFO] Detected multiple URLs: https://mirrors.pku.edu.cn/immortalwrt/releases/23.05.3/packages/x86_64/packages/pv_1.6.6-1_x86_64.ipk

[INFO] Downloading: https://mirrors.pku.edu.cn/immortalwrt/releases/23.05.3/packages/x86_64/packages/pv_1.6.6-1_x86_64.ipk
--2024-09-02 16:32:48--  https://mirrors.pku.edu.cn/immortalwrt/releases/23.05.3/packages/x86_64/packages/pv_1.6.6-1_x86_64.ipk
Resolving mirrors.pku.edu.cn... 162.105.120.100, 2001:da8:201:1120::a269:7864
Connecting to mirrors.pku.edu.cn|162.105.120.100|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22872 (22K) [application/octet-stream]
Saving to: '/tmp/upload/pv_1.6.6-1_x86_64.ipk'

pv_1.6.6-1_x86_64.ipk    100%[================================>]  22.34K  --.-KB/s    in 0s      

2024-09-02 16:32:49 (268 MB/s) - '/tmp/upload/pv_1.6.6-1_x86_64.ipk' saved [22872/22872]

[INFO] Before installation, the index file needs to be updated to obtain online software sources to avoid installation errors and resolve dependency issues.
1. Confirm (execute apply_repo to configure software sources and opkg update)
0. Try (only opkg update)
Please enter your choice (1/0): 1
[INFO] Configuring software sources and updating package index...

INFO    =================================================================
The software source is purely free sharing, but you can use free overseas software source 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.net/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!
[INFO] Installing IPK file: /tmp/upload/pv_1.6.6-1_x86_64.ipk
Installing pv (1.6.6-1) to root...
Configuring pv.

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

Footnotes#

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

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

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