Staex logostaexDocs
Docs/Forwarding Rules

Forwarding Rules

Configure packet forwarding rules for the MCC network.

Overview#

Forwarding rules define how traffic arriving on specific ports is redirected to other nodes in the MCC network. The rules file is located at /etc/mcc/forwarding-rules.conf by default. You can override the path using the forwarding-rules property in the main configuration file.

Rule Syntax#

Each rule follows this format:

shell
port from PORT1 to IP:PORT2 protocol PROTOCOL

This forwards traffic arriving on local port PORT1 to PORT2 on the node identified by IP. The IP address must belong to the MCC overlay network. The protocol field accepts tcp or udp.

Applying Rules#

Use the following command to safely replace the current forwarding rules:

bash
mcc apply-forwarding-rules file

This command provides interactive confirmation before committing changes. If you do not confirm within the configured timeout (default 7 seconds), the changes are automatically reverted. This safety mechanism prevents accidental lockouts when modifying forwarding rules on remote nodes.