network
rfswift network
Manage RF Swift NAT networks for per-container network isolation.
Synopsis
# List all NAT networks
rfswift network list
# Create a NAT network
rfswift network create -n NAME [--subnet CIDR]
# Remove a NAT network
rfswift network remove -n NAME
# Remove orphaned networks
rfswift network cleanupThe network command manages RF Swift NAT networks. These are isolated bridge networks with their own subnets, used when containers are created with -t nat network mode. Multiple containers can share the same NAT network to communicate with each other while remaining isolated from other networks.
-t nat with rfswift run. These commands give you manual control for advanced setups.Subcommands
network list
List all RF Swift NAT networks with their subnet allocations and associated containers.
rfswift network listNo additional options.
network create
Create a named NAT network that containers can join.
Options:
| Flag | Description | Required | Example |
|---|---|---|---|
-n, --name STRING |
Network name | Yes | -n pentest_lab |
--subnet STRING |
Custom subnet CIDR | No | --subnet 172.30.10.0/24 |
If --subnet is omitted, RF Swift auto-allocates a /28 subnet from the 172.30.0.0/16 range.
-n in an interactive terminal, the command prompts for the network name and subnet.network remove
Remove an RF Swift NAT network by name.
Options:
| Flag | Description | Required | Example |
|---|---|---|---|
-n, --name STRING |
Network name or container name | Yes | -n pentest_lab |
-n in an interactive terminal, shows a picker of existing NAT networks with a confirmation prompt before removal.network cleanup
Remove orphaned NAT networks whose associated container no longer exists.
rfswift network cleanupNo additional options.
Examples
Create an Isolated Lab Network
# Create a network for pentesting
rfswift network create -n pentest_lab
# Create with a specific subnet
rfswift network create -n pentest_lab --subnet 172.30.10.0/24Run Containers on the Same Network
# Create the network
rfswift network create -n my_lab
# Run containers that share the network
rfswift run -i sdr_full -n sdr_node -t nat:rfswift_nat_my_lab
rfswift run -i wifi -n wifi_node -t nat:rfswift_nat_my_lab
# Both containers can communicate on the same subnetList and Clean Up
# See all NAT networks
rfswift network list
# Remove a specific network
rfswift network remove -n pentest_lab
# Clean up networks for deleted containers
rfswift network cleanupUsing NAT Mode with rfswift run
NAT networks are most commonly created implicitly via the -t nat flag:
# Auto-creates an isolated NAT network for this container
rfswift run -i sdr_full -n my_sdr -t nat
# Join an existing network by name
rfswift run -i wifi -n wifi_tools -t nat:rfswift_nat_my_sdrNetwork Naming
RF Swift NAT networks follow the naming convention rfswift_nat_<name> and are labeled with org.rfswift.nat for identification. When using -t nat in rfswift run, the network name is derived from the container name.
Troubleshooting
Network Not Found
Problem: rfswift run -t nat:rfswift_nat_foo fails because the network doesn’t exist
Solution:
# Create the network first
rfswift network create -n foo
# Or use -t nat (without a name) to auto-create
rfswift run -i sdr_full -n my_sdr -t natOrphaned Networks
Problem: Networks remain after containers are deleted
Solution:
# Clean up all orphaned networks
rfswift network cleanupSubnet Conflict
Problem: Network creation fails due to subnet overlap
Solution:
# Specify a non-conflicting subnet
rfswift network create -n my_net --subnet 10.10.0.0/24
# Or let RF Swift auto-allocate
rfswift network create -n my_netRelated Commands
run- Create containers with-t natnetwork modeports- Manage port bindings for containers on NAT networksengine- Container engine selection