route
Show and manipulate the route table. tldr-pages
On macOS 2 Sigma rules name it
Several platforms
Display the information of route table
route -nIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add route rule
sudo route add -net ip_address netmask netmask_address gw gw_addressIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Delete route rule
sudo route del -net ip_address netmask netmask_address dev gw_addressIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
macOS
Manually manipulate the routing tables.
Add a route to a destination through a gateway
sudo route add "destination_ip_address" "gateway_address"IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a route to a /24 subnet through a gateway
sudo route add "subnet_ip_address/24" "gateway_address"IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Run in test mode (does not do anything, just print)
sudo route -t add "destination_ip_address/24" "gateway_address"IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Remove all routes
sudo route flushIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Delete a specific route
sudo route delete "destination_ip_address/24"IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Look up and display the route for a destination (hostname or IP address)
sudo route get "destination"IdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community