From 714c807bc36227ada2276381d1dfffe9a4f0bf92 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Thu, 14 May 2026 10:16:34 +0300 Subject: [PATCH] ip-route-add: add example (#22402) * Update ip-route-add.md * Update ip-route-add.md --- pages/linux/ip-route-add.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/linux/ip-route-add.md b/pages/linux/ip-route-add.md index 906f8f9d89..37644c9084 100644 --- a/pages/linux/ip-route-add.md +++ b/pages/linux/ip-route-add.md @@ -18,3 +18,7 @@ - Add a route to a specific routing table: `sudo ip {{[r|route]}} {{[a|add]}} {{destination_ip}} dev {{ethX}} {{[t|table]}} {{ip_address}}` + +- Force internet traffic to go through a specific device while leaving local traffic unchanged (requires also creating a rule): + +`sudo ip {{[r|route]}} {{[a|add]}} default via {{gateway_ip}} dev {{ethX}} table {{table_id}}`