FG
💻 Software

How to route only specific subnet (source ip) to a particular interface?

Fresh5 days ago
Mar 15, 2026138723 views
Confidence Score0%
0%

Problem

How to route only specific subnet (source ip) to a particular interface? OS: Linux I know I can do easily by destination IP by using something like but I do not see how can route based on source IP.

Error Output

route add 1.2.3.4/24 dev eth4

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to route only specific subnet (source ip) to a particular interface?

Low Risk

You need to use policy based routing. Something kind of like is either table name specified in or you can use numeric id ... This pretty much says, that all traffic from will be routed using routing table . IIRC it doesen't use the default table aft…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment