Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:routing [2007/11/30 15:12]
a
linux:routing [2009/05/25 00:35] (current)
Line 2: Line 2:
  
 tweak linux [[:linux:sysctl|sysctl]], see [[:linux:sysctl#linux as router|this]] tweak linux [[:linux:sysctl|sysctl]], see [[:linux:sysctl#linux as router|this]]
 +
 +
  
  
Line 18: Line 20:
    ip rule add from x.x.x.2 table link1    ip rule add from x.x.x.2 table link1
    ip rule add from z.z.z.20 table link2    ip rule add from z.z.z.20 table link2
 +
 +to create rule that covers the whole interface (or even per port) and inbound traffic
 +
 +<note important>Be careful if you're using 26sec ipsec stack. The ipsec inbound interface is the same as physical one and you'll be having problems with ipsec routing table</note>
 +
 +  iptables -t mangle -I PREROUTING -i vlan501 -j MARK --set-mark 0x1
 +  iptables -t mangle -I PREROUTING -i vla2510 -j MARK --set-mark 0x2
 +  ip rule add fwmark 0x1 table table link1
 +  ip rule add fwmark 0x2 table table link2
 +
  
 ===== same-alternative method ===== ===== same-alternative method =====
linux/routing.1196431951.txt.gz ยท Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready