http://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&feed=atom&action=historyLimit Networking on Multihomed hosts - Revision history2024-03-28T20:36:24ZRevision history for this page on the wikiMediaWiki 1.20.2http://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&diff=5076&oldid=prevGlenn: -cat2011-10-21T22:10:21Z<p>-cat</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 22:10, 21 October 2011</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 25:</td>
<td colspan="2" class="diff-lineno">Line 25:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Traffic between IPs on the same host won't go the routes outside the host, you need to set up iptables here.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Traffic between IPs on the same host won't go the routes outside the host, you need to set up iptables here.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">[[Category:Documentation]]</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Network related]]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Network related]]</div></td></tr>
</table>Glennhttp://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&diff=5045&oldid=prevGlenn: + Category:Network related2011-10-21T21:29:01Z<p>+ <a href="/Category:Network_related" title="Category:Network related">Category:Network related</a></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 21:29, 21 October 2011</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 26:</td>
<td colspan="2" class="diff-lineno">Line 26:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Documentation]]</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Documentation]]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Network related]]</ins></div></td></tr>
</table>Glennhttp://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&diff=4885&oldid=prevGlenn: +cat2011-10-21T19:20:57Z<p>+cat</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 19:20, 21 October 2011</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 24:</td>
<td colspan="2" class="diff-lineno">Line 24:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Issues ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Issues ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Traffic between IPs on the same host won't go the routes outside the host, you need to set up iptables here.</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>Traffic between IPs on the same host won't go the routes outside the host, you need to set up iptables here.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">[[Category:Documentation]]</ins></div></td></tr>
</table>Glennhttp://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&diff=4160&oldid=prevAdrianReyer: Issues added2010-01-13T23:42:49Z<p>Issues added</p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 23:42, 13 January 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 21:</td>
<td colspan="2" class="diff-lineno">Line 21:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>ip rule add from net-VServer-B/mask table 101</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>ip rule add from net-VServer-B/mask table 101</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div></pre></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">== Issues ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">Traffic between IPs on the same host won't go the routes outside the host, you need to set up iptables here.</ins></div></td></tr>
</table>AdrianReyerhttp://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&diff=4159&oldid=prevAdrianReyer: /* Situation */2010-01-13T23:01:47Z<p><span dir="auto"><span class="autocomment">Situation</span></span></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black;">Revision as of 23:01, 13 January 2010</td>
</tr><tr><td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Situation ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Situation ==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="background: #ffa; color:black; font-size: smaller;"><div>You have a multihomed host, e.g. DMZ and LAN or different DMZs and want a single VServer only to <del class="diffchange diffchange-inline">e </del>able to send packets over a specific network.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>You have a multihomed host, e.g. DMZ and LAN or different DMZs and want a single VServer only to <ins class="diffchange diffchange-inline">be </ins>able to send packets over a specific network.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div> </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Solution ==</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>== Solution ==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>I used alternate routing tables:</div></td><td class='diff-marker'> </td><td style="background: #eee; color:black; font-size: smaller;"><div>I used alternate routing tables:</div></td></tr>
</table>AdrianReyerhttp://www.linux-vserver.org/index.php?title=Limit_Networking_on_Multihomed_hosts&diff=4158&oldid=prevAdrianReyer: Created page with '== Situation == You have a multihomed host, e.g. DMZ and LAN or different DMZs and want a single VServer only to e able to send packets over a specific network. == Solution == I …'2010-01-13T22:56:39Z<p>Created page with '== Situation == You have a multihomed host, e.g. DMZ and LAN or different DMZs and want a single VServer only to e able to send packets over a specific network. == Solution == I …'</p>
<p><b>New page</b></p><div>== Situation ==<br />
You have a multihomed host, e.g. DMZ and LAN or different DMZs and want a single VServer only to e able to send packets over a specific network.<br />
== Solution ==<br />
I used alternate routing tables:<br />
<br />
Once (tested on Debian):<br />
<pre><br />
echo 100 vservera > /etc/iproute2/rt_tables<br />
echo 101 vserverb > /etc/iproute2/rt_tables<br />
</pre><br />
<br />
After rebooting (write an init script)<br />
<pre><br />
ip route add IP-VServer-A/mask table vservera dev ethA<br />
ip route add default table vservera via Gateway-A<br />
ip route add IP-VServer-B/mask table vserverb dev ethB<br />
ip route add default table vserverb via Gateway-B<br />
<br />
ip rule add from net-VServer-A/mask table 100<br />
ip rule add from net-VServer-B/mask table 101<br />
</pre></div>AdrianReyer