http://wiki.dd-wrt.com/wiki/index.php?title=Policy_Based_Routing&action=history&feed=atom Policy Based Routing - Revision history 2024-03-29T11:42:33Z Revision history for this page on the wiki MediaWiki 1.10.1 http://wiki.dd-wrt.com/wiki/index.php?title=Policy_Based_Routing&diff=55108&oldid=prev Atatob: Add language list 2019-12-06T05:54:14Z <p>Add language list</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 05:54, 6 December 2019</td> </tr> <tr><td colspan="2" align="left"><strong>Line 1:</strong></td> <td colspan="2" align="left"><strong>Line 1:</strong></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">{{Languages|Policy Based Routing}}</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==Introduction==</td><td> </td><td style="background: #eee; font-size: smaller;">==Introduction==</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">Traditional routing functions by sending packets out interfaces depending on where the destination address is by keeping a routing table of which networks are connected to which interfaces. Policy Based Routing is an advanced concept that sends packets based on other criteria such as the source address or TCP port. It does this by creating multiple routing tables and rules that specify which routing table to use when certain criteria are met. Source based policy routing is fairly easy to configure and doesn't require much thought but other forms of policy routing require much more thought to ensure that it functions.</td><td> </td><td style="background: #eee; font-size: smaller;">Traditional routing functions by sending packets out interfaces depending on where the destination address is by keeping a routing table of which networks are connected to which interfaces. Policy Based Routing is an advanced concept that sends packets based on other criteria such as the source address or TCP port. It does this by creating multiple routing tables and rules that specify which routing table to use when certain criteria are met. Source based policy routing is fairly easy to configure and doesn't require much thought but other forms of policy routing require much more thought to ensure that it functions.</td></tr> </table> Atatob http://wiki.dd-wrt.com/wiki/index.php?title=Policy_Based_Routing&diff=54981&oldid=prev Jeremywh7: /* References */ Add forum link 2019-11-01T14:44:08Z <p><span class="autocomment">References -</span> Add forum link</p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 14:44, 1 November 2019</td> </tr> <tr><td colspan="2" align="left"><strong>Line 32:</strong></td> <td colspan="2" align="left"><strong>Line 32:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==References==</td><td> </td><td style="background: #eee; font-size: smaller;">==References==</td></tr> <tr><td>-</td><td style="background: #ffa; font-size: smaller;">http://lartc.org/howto/lartc.rpdb.html#LARTC.RPDB.SIMPLE</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">Forum post with many guides and scripts: [https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686 Policy Based Routing guide for DDWRT]&lt;br&gt;</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"><ins style="color: red; font-weight: bold; text-decoration: none;">Linux Advanced Routing &amp; Traffic Control: [</ins>http://lartc.org/howto/lartc.rpdb.html#LARTC.RPDB.SIMPLE <ins style="color: red; font-weight: bold; text-decoration: none;">Simple source policy routing]&lt;br&gt;</ins></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">&#160;</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Routing]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Routing]]</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Advanced tutorials]]</td><td> </td><td style="background: #eee; font-size: smaller;">[[Category:Advanced tutorials]]</td></tr> </table> Jeremywh7 http://wiki.dd-wrt.com/wiki/index.php?title=Policy_Based_Routing&diff=46362&oldid=prev Sash: /* Source Based Routing */ 2014-02-25T00:13:29Z <p><span class="autocomment">Source Based Routing</span></p> <table border='0' width='98%' cellpadding='0' cellspacing='4' style="background-color: white;"> <tr> <td colspan='2' width='50%' align='center' style="background-color: white;">←Older revision</td> <td colspan='2' width='50%' align='center' style="background-color: white;">Revision as of 00:13, 25 February 2014</td> </tr> <tr><td colspan="2" align="left"><strong>Line 17:</strong></td> <td colspan="2" align="left"><strong>Line 17:</strong></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> ip route add default via 10.0.0.1 dev ppp0 table 200</td><td> </td><td style="background: #eee; font-size: smaller;"> ip route add default via 10.0.0.1 dev ppp0 table 200</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"> ip route flush cache</td><td> </td><td style="background: #eee; font-size: smaller;"> ip route flush cache</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;">You can show the table content with (might not work on crippled ip route)</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"></td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> ip route list table table 200</td></tr> <tr><td colspan="2">&nbsp;</td><td>+</td><td style="background: #cfc; font-size: smaller;"> ip rule show</td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;"></td><td> </td><td style="background: #eee; font-size: smaller;"></td></tr> <tr><td> </td><td style="background: #eee; font-size: smaller;">==Integrating the Commands==</td><td> </td><td style="background: #eee; font-size: smaller;">==Integrating the Commands==</td></tr> </table> Sash http://wiki.dd-wrt.com/wiki/index.php?title=Policy_Based_Routing&diff=41257&oldid=prev Phuzi0n: omg every networking noob wants policy based routing 2011-09-19T18:12:21Z <p>omg every networking noob wants policy based routing</p> <p><b>New page</b></p><div>==Introduction==<br /> Traditional routing functions by sending packets out interfaces depending on where the destination address is by keeping a routing table of which networks are connected to which interfaces. Policy Based Routing is an advanced concept that sends packets based on other criteria such as the source address or TCP port. It does this by creating multiple routing tables and rules that specify which routing table to use when certain criteria are met. Source based policy routing is fairly easy to configure and doesn't require much thought but other forms of policy routing require much more thought to ensure that it functions.<br /> <br /> ==Routing Commands==<br /> ===Source Based Routing===<br /> Source based routing only requires a few commands:<br /> <br /> ip rule add from '''[source IP]/[netmask]''' table 200<br /> ip route add default via '''[gateway]''' dev '''[interface]''' table 200<br /> ip route flush cache<br /> <br /> The '''[source IP]''' should be whatever the IP of the machine is that you want to be routed differently, optionally with a '''[netmask]''' to specify a block of source addresses to route differently. The '''[gateway]''' should be the IP of the next router to send traffic to such as your VPN server or the gateway IP of your ISP. The '''[interface]''' should be whichever interface the traffic needs to be sent out to reach the alternative gateway such as tun0 for a VPN.<br /> <br /> Example:<br /> <br /> ip rule add from 192.168.1.128/28 table 200<br /> ip route add default via 10.0.0.1 dev ppp0 table 200<br /> ip route flush cache<br /> <br /> ==Integrating the Commands==<br /> ===With OpenVPN===<br /> Your routing commands need to go in the route-up script. See the [[OpenVPN]] guide for examples of how to configure route-up scripts.<br /> ===With PPTP===<br /> Your routing commands need to go in the /tmp/pptpd_client/ip-up script, or maybe .ipup as per [[Script Execution]] (needs testing).<br /> ===With A Physical Interface===<br /> Your routing commands can go in the firewall script on the Administration-&gt;Commands page.<br /> <br /> ==References==<br /> http://lartc.org/howto/lartc.rpdb.html#LARTC.RPDB.SIMPLE<br /> <br /> [[Category:Routing]]<br /> [[Category:Advanced tutorials]]</div> Phuzi0n