-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
25 lines (15 loc) · 1.11 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
A quick script to run on a machine with /etc/network/interfaces which enables multirouting
- traffic in/out of each interface sits in it's own table with the router specified in /etc/network/interfaces or received via dhclient and in the lease table
- traffic orginating without a specific interface will use the default table
- if /etc/network/interfaces has a line with
# The primary network interface
the default route, otherwise it's whatever the normal behavior is (interface that comes up first perhaps?)
script can be run as often as needed, and will change things if needed, so it sits in dhclient
Only tested for specific use cases
- machine with 2 interfaces both on dhcp
I suspect netplan has a way to do this properly for more recent ubuntu versions, although iif and oif seem to struggle in my initial tests
To apply
wget https://raw.githubusercontent.com/isostatic/multihomeconfig/main/src/usr/bin/enable_multi_routing
chmod 755 enable_multi_routing
sudo mv enable_multi_routing /usr/bin/
echo /usr/bin/enable_multi_routing | sudo tee /etc/dhcp/dhclient-exit-hooks.d/enable_multi_routing