Skip to content

Instantly share code, notes, and snippets.

@cyrex562
Created May 16, 2019 16:09
Show Gist options
  • Select an option

  • Save cyrex562/51edf88d525921c7d0d2dcd9b42e914f to your computer and use it in GitHub Desktop.

Select an option

Save cyrex562/51edf88d525921c7d0d2dcd9b42e914f to your computer and use it in GitHub Desktop.
Configure source routing

Ubuntu 18.04

  1. Create a routing table entry: echo 200 >> /etc/iproute2/rt_tables
  2. Add a source routing rule: ip rule add from 10.100.100.0/24 lookup src_rt
  3. Add a default gateway to the routing table: ip route add default dev wg0 table src_rt
  4. Add a local network route to the routing table: ip route add 10.100.100.0/24 dev ens34 table src_rt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment