Ubiquiti EdgeOS Cheatsheet
#
Ubiquiti EdgeOS is the operating system used in Ubiquiti’s EdgeRouter products. This cheatsheet covers commonly used commands and configurations for Ubiquiti EdgeOS.
Basic Commands
#
Command/Option | Example | Description |
---|
show version | show version | Display the software version and system information |
configure | configure | Enter configuration mode |
commit | commit | Commit changes to the configuration |
save | save | Save the current configuration |
exit | exit | Exit configuration mode |
reboot | reboot | Reboot the router |
shutdown | shutdown | Shut down the router |
Interface Configuration
#
Command/Option | Example | Description |
---|
set interfaces ethernet eth0 address <addr> | set interfaces ethernet eth0 address 192.168.1.1/24 | Configure IP address for interface eth0 |
set interfaces ethernet eth0 description <desc> | set interfaces ethernet eth0 description 'WAN' | Set description for interface eth0 |
delete interfaces ethernet eth0 address <addr> | delete interfaces ethernet eth0 address 192.168.1.1/24 | Remove IP address from interface eth0 |
show interfaces | show interfaces | Display interface status |
VLAN Configuration
#
Command/Option | Example | Description |
---|
set interfaces ethernet eth0 vif <id> address <addr> | set interfaces ethernet eth0 vif 10 address 192.168.10.1/24 | Create a VLAN on an interface |
set interfaces ethernet eth0 vif <id> description <desc> | set interfaces ethernet eth0 vif 10 description 'Management VLAN' | Set description for VLAN |
delete interfaces ethernet eth0 vif <id> | delete interfaces ethernet eth0 vif 10 | Remove a VLAN from an interface |
show interfaces | show interfaces | Display interface and VLAN status |
Firewall Configuration
#
Command/Option | Example | Description |
---|
set firewall name <name> default-action <action> | set firewall name WAN_IN default-action drop | Create a firewall rule set with default action |
set firewall name <name> rule <num> action <action> | set firewall name WAN_IN rule 10 action accept | Add a firewall rule to the rule set |
set firewall name <name> rule <num> source address <addr> | set firewall name WAN_IN rule 10 source address 192.168.1.0/24 | Specify source address for the rule |
set firewall name <name> rule <num> destination port <port> | set firewall name WAN_IN rule 10 destination port 22 | Specify destination port for the rule |
set interfaces ethernet eth0 firewall in name <name> | set interfaces ethernet eth0 firewall in name WAN_IN | Apply firewall rule set to an interface |
show firewall | show firewall | Display firewall rules and status |
VPN Configuration
#
Command/Option | Example | Description |
---|
set vpn ipsec site-to-site peer <peer> authentication mode pre-shared-secret | set vpn ipsec site-to-site peer 203.0.113.1 authentication mode pre-shared-secret | Set VPN peer authentication mode |
set vpn ipsec site-to-site peer <peer> authentication pre-shared-secret <secret> | set vpn ipsec site-to-site peer 203.0.113.1 authentication pre-shared-secret mysecret | Set VPN pre-shared secret |
set vpn ipsec site-to-site peer <peer> connection-type initiate | set vpn ipsec site-to-site peer 203.0.113.1 connection-type initiate | Set VPN connection type |
set vpn ipsec site-to-site peer <peer> default-esp-group <group> | set vpn ipsec site-to-site peer 203.0.113.1 default-esp-group default | Set VPN ESP group |
set vpn ipsec site-to-site peer <peer> local-address <addr> | set vpn ipsec site-to-site peer 203.0.113.1 local-address 192.168.1.1 | Set local IP address for VPN |
set vpn ipsec site-to-site peer <peer> tunnel <id> local prefix <prefix> | set vpn ipsec site-to-site peer 203.0.113.1 tunnel 1 local prefix 192.168.1.0/24 | Set local prefix for VPN tunnel |
set vpn ipsec site-to-site peer <peer> tunnel <id> remote prefix <prefix> | set vpn ipsec site-to-site peer 203.0.113.1 tunnel 1 remote prefix 10.0.0.0/24 | Set remote prefix for VPN tunnel |
show vpn ipsec | show vpn ipsec | Display VPN IPsec status |
Routing Configuration
#
Command/Option | Example | Description |
---|
set protocols static route <network> next-hop <gateway> | set protocols static route 0.0.0.0/0 next-hop 192.168.1.1 | Add a static route |
delete protocols static route <network> | delete protocols static route 0.0.0.0/0 | Remove a static route |
show ip route | show ip route | Display routing table |
System Management
#
Command/Option | Example | Description |
---|
set system host-name <name> | set system host-name MyRouter | Set the system hostname |
set system time-zone <zone> | set system time-zone UTC | Set the system time zone |
set system login user <user> authentication plaintext-password <password> | set system login user admin authentication plaintext-password mypassword | Set user password |
set system ntp server <server> | set system ntp server 0.pool.ntp.org | Set NTP server for time synchronization |
show system uptime | show system uptime | Display system uptime |
show system memory | show system memory | Display system memory usage |
show system disk | show system disk | Display system disk usage |
This cheatsheet provides essential Ubiquiti EdgeOS commands for network management, interface configuration, VLANs, firewalls, VPNs, routing, and system management. For more detailed information, refer to the Ubiquiti EdgeOS documentation.