Skip to content

Commit

Permalink
Issue #2: Add script for adding routing table for KOREN network
Browse files Browse the repository at this point in the history
  • Loading branch information
hodduc committed Nov 26, 2014
1 parent 9e6bdf5 commit 676192e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions etc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ INSTALL=install -m a+r
$(INSTALL) $< $@
sudo vim /etc/logcheck/logcheck.conf +'%s/^#INTRO=1/INTRO=0/ | %s/^REPORTLEVEL=.*/REPORTLEVEL="server"/' +wq

# Routing rule for KOREN
/etc/network/if-up.d/routing-koren: routing-koren
$(INSTALL) -m a=r,u=x $< $@

# default rule is to just install the config file from here
.SECONDEXPANSION:
/etc/%: $$(@F)
Expand Down
9 changes: 9 additions & 0 deletions etc/routing-koren
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh
# Set routing table for KOREN network
set -e

ip rule add from all to 103.22.220.128/28 lookup koren
ip rule add from 103.22.220.128/28 lookup koren
ip r d default via 103.22.220.129 dev eth1
ip r a table koren default via 103.22.220.129 dev eth1
ip r a table koren 103.22.220.128/28 dev eth1 scope link src 103.22.220.133

0 comments on commit 676192e

Please sign in to comment.