Results 1 to 6 of 6

Thread: Where should policy based routing rules live?

  1. #1
    Join Date
    Sep 2007
    Beans
    25

    Where should policy based routing rules live?

    Seems like this should be a simple question, but I've looked around and have not found an obvious location to keep custom policy based routing rules in Ubuntu.

    /etc/network/if-up.d comes to mind, but I was wondering is that was a "standard" spot. Also it doesn't seem like these rules really need to run each time an interface is up'ed or down'ed.

    Commands that need to be run are things like:

    ip rule add from 192.168.1.1/32 table blahblah
    ip route add 192.168.1.0/24 dev eth1 table blahblah

  2. #2
    Join Date
    Oct 2008
    Location
    philippines
    Beans
    618
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Where should policy based routing rules live?

    ...hope i get you right, iptable is handle by 'ufw' (uncomplicated firewall), and firestarter is its 'gui' for easy configuration.

  3. #3
    Join Date
    Sep 2007
    Beans
    25

    Re: Where should policy based routing rules live?

    Quote Originally Posted by byStanderone View Post
    ...hope i get you right, iptable is handle by 'ufw' (uncomplicated firewall), and firestarter is its 'gui' for easy configuration.
    No, iptables is different. I'm talking about routing rules for iproute2.

  4. #4
    Join Date
    Oct 2008
    Location
    philippines
    Beans
    618
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Where should policy based routing rules live?

    ...well, i'd guess it's stored in the router itself.

  5. #5
    Join Date
    Jan 2009
    Beans
    11

    Re: Where should policy based routing rules live?

    bump....

    Anyone know the answer to this?
    I put mine in rc.local, but I assume there is a better place.

  6. #6
    Join Date
    Feb 2009
    Beans
    71

    Re: Where should policy based routing rules live?

    Better late then never....

    As far as I know you stick those rules in /etc/network/interfaces in the stanza of the interface they deal with.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •