### Setup: Install Firewall and JSON Processor Source: https://docs.ice.io/ion-blockchain/validator Installs the Uncomplicated Firewall (ufw) and the jq command-line JSON processor, essential tools for node security and configuration management. ```bash sudo apt install -y ufw jq ``` -------------------------------- ### Run MyIonCtrl Console Source: https://docs.ice.io/ion-blockchain/validator Starts the MyIonCtrl command-line interface from the user account used for installation. This is the primary interface for interacting with the validator node. ```bash myionctrl ``` -------------------------------- ### Install MyIonCtrl Validator Source: https://docs.ice.io/ion-blockchain/validator Downloads and executes the MyIonCtrl installation script with the 'validator' mode. This command fetches the latest script and runs it with administrative privileges. ```bash wget https://raw.githubusercontent.com/ice-blockchain/myionctrl/refs/heads/ion-mainnet/scripts/install.sh sudo bash install.sh -m validator ``` -------------------------------- ### Disaster Recovery: Start Services Source: https://docs.ice.io/ion-blockchain/validator Starts the MyIonCore and validator processes after recovery operations are complete, bringing the node back online. ```bash sudo systemctl start validator sudo systemctl start myioncore ``` -------------------------------- ### Setup: Enable Firewall Source: https://docs.ice.io/ion-blockchain/validator Enables the ufw firewall, applying all configured rules to protect the node. ```bash sudo ufw enable ``` -------------------------------- ### Connect via SSH Source: https://docs.ice.io/ion-blockchain/validator Command to log in to the server using the newly created non-root user account. This is essential for performing subsequent installation and management tasks. ```bash ssh @ ``` -------------------------------- ### Setup: Basic Firewall Lockdown Source: https://docs.ice.io/ion-blockchain/validator Configures the ufw firewall to deny all incoming connections by default and allow all outgoing connections, establishing a secure baseline. ```bash sudo ufw default deny incoming sudo ufw default allow outgoing ``` -------------------------------- ### Validator Service Control Source: https://docs.ice.io/ion-blockchain/validator Commands to manage the validator service, including stopping, checking status, and starting it. These are crucial for maintenance tasks like database grooming. ```bash systemctl stop validator systemctl status validator systemctl start validator ``` -------------------------------- ### Setup: Allow Management Network Access Source: https://docs.ice.io/ion-blockchain/validator Adds a ufw rule to allow incoming connections from a specified management network, enabling administrative access. ```bash sudo ufw insert 1 allow from ``` -------------------------------- ### Setup: Check Firewall Status Source: https://docs.ice.io/ion-blockchain/validator Displays the current status and numbered rules of the ufw firewall, allowing verification of the applied security configuration. ```bash sudo ufw status numbered ``` -------------------------------- ### MyIonCtrl Wallet Commands Source: https://docs.ice.io/ion-blockchain/validator Provides essential commands for managing validator wallets within the MyIonCtrl console. This includes listing, activating wallets, and setting stake amounts. ```APIDOC MyIonCtrl Wallet Management: List Wallets: wl - Description: Displays a list of all available validator wallets. - Usage: Execute 'wl' in the MyIonCtrl console. Activate Wallets: aw [wallet name] - Description: Activates specified wallet(s). If no wallet name is provided, all available wallets are activated. - Parameters: - wallet name (optional): The name of the wallet to activate. - Usage: 'aw' to activate all, 'aw validator_wallet_001' to activate a specific wallet. Set Stake Size: set stake [amount] - Description: Sets the stake amount for the validator. - Parameters: - amount: The number of coins to stake. - Usage: 'set stake 1500001' Check Validator Effectiveness: check_ef - Description: Retrieves validator efficiency data for the last and current rounds by calling the 'checkloadall' utility. Requires efficiency > 90% for full round period. - Usage: 'check_ef' in the MyIonCtrl console. ``` -------------------------------- ### Uninstall MyIonCtrl Source: https://docs.ice.io/ion-blockchain/validator Removes the MyIonCtrl installation from the system using its dedicated uninstall script. This command should be run with administrative privileges. ```bash sudo bash /usr/src/myionctrl/uninstall.sh ``` -------------------------------- ### Create Non-Root User Source: https://docs.ice.io/ion-blockchain/validator Steps to create a new user account and add it to the sudo group, which is a prerequisite for running MyIonCtrl. This ensures operations are performed with appropriate permissions. ```bash sudo adduser sudo usermod -aG sudo ``` -------------------------------- ### Disaster Recovery: Set Permissions Source: https://docs.ice.io/ion-blockchain/validator Ensures the validator user has the correct ownership and permissions for the database directory, which is crucial after restoring from a backup. ```bash sudo chown -R validator:validator /var/ion-work/db ``` -------------------------------- ### Setup: Expose Node UDP Port Source: https://docs.ice.io/ion-blockchain/validator Configures ufw to allow incoming UDP traffic on the node's operational port, dynamically determined from the config.json file. This is essential for node communication. ```bash sudo ufw allow proto udp from any to any port `sudo jq -r '.addrs[0].port' /var/ion-work/db/config.json` ``` -------------------------------- ### Setup: Disable Automated ICMP Echo Request Source: https://docs.ice.io/ion-blockchain/validator Modifies ufw's before.rules to disable the automatic acceptance of ICMP echo requests (ping), enhancing network invisibility. ```bash sudo sed -i 's/-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT/#-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT/g' /etc/ufw/before.rules ``` -------------------------------- ### Disaster Recovery: Stop Services Source: https://docs.ice.io/ion-blockchain/validator Stops the MyIonCore and validator processes as a prerequisite for disaster recovery operations. Ensures services are not running during configuration changes. ```bash sudo systemctl stop validator sudo systemctl stop myioncore ``` -------------------------------- ### Check MyIonCtrl Status Source: https://docs.ice.io/ion-blockchain/validator Displays the current operational status of the MyIonCtrl services, including the core node and the local validator. Essential for verifying synchronization and health. ```bash status ``` -------------------------------- ### Database Cleanup Commands Source: https://docs.ice.io/ion-blockchain/validator Steps to perform database grooming for the ION Node/Validator. This process removes old log files to manage disk space and prevent corruption. It requires stopping the validator service first. ```bash sudo -s systemctl stop validator systemctl status validator find /var/ion-work/db -name 'LOG.old*' -exec rm {} + systemctl start validator ``` -------------------------------- ### Systemd Configuration Reload Source: https://docs.ice.io/ion-blockchain/validator Reloads the systemd manager configuration after modifying service files. This command ensures that systemd recognizes the changes made to the validator service. ```bash systemctl daemon-reload ``` -------------------------------- ### Configure Validator Service for Archive Node Source: https://docs.ice.io/ion-blockchain/validator Updates the systemd service file for the validator engine to run as an archive node with specific retention policies. This ensures long-term data storage. ```bash ExecStart=/usr/bin/ion/validator-engine --threads 11 --daemonize --global-config /usr/bin/ion/global.config.json --db /var/ion-work/db/ --logname /var/ion-work/log --state-ttl 315360000 --archive-ttl 315360000 --block-ttl 315360000 --verbosity 1 ``` -------------------------------- ### Expose LiteServer Port Source: https://docs.ice.io/ion-blockchain/validator Configures ufw to allow incoming TCP traffic on the LiteServer port, dynamically determined from the config.json file. Note: This port should not be exposed publicly on a validator node. ```bash sudo ufw allow proto tcp from any to any port `sudo jq -r '.liteservers[0].port' /var/ion-work/config.json` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.