ip-route-add
Add a new networking route. tldr-pages
On Linux
Linux
Add a default route using gateway forwarding
sudo ip [r [a default via gateway_ipIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a default route using ethX
sudo ip [r [a default dev ethXIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a static route
sudo ip [r [a destination_ip via gateway_ip dev ethXIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Add a route to a specific routing table
sudo ip [r [a destination_ip dev ethX [t ip_addressIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community
Force internet traffic to go through a specific device while leaving local traffic unchanged (requires also creating a rule)
sudo ip [r [a default via gateway_ip dev ethX table table_idIdentifyTrips 1 Sigma rule: informationalSystem Network Discovery - Linux by Ömer Günal and remotephone, oscd.community