From: Dariush Pietrzak (eyck_at_ghost.anime.pl)
Date: Wed 26 Nov 2003 - 21:55:16 GMT
> pass unless they come from ip 192.168.47.254 (eth0.. yeah i know it's
> kinda backwards). This creates a problem when i set up the vserver
> "storm" with ip number 192.168.0.5. It uses the same default gateway
> as context 0 and that is a big problem.
>
> I've seen some solutions with iproute but I'm not able to figure out how
> they work. I'm wondering if it in any way could be possible to set the
> default gateway of "storm" to be 192.168.0.254 (eth1) and treat it as
> any other machine on the network (do address translation).
You can create multiple routing tables, for example table 'storm', and set
it's default gateway to 192.168.0.254. Then you direct packages to correct
table using ip rule.
IIRC you need "CONFIG_IP_MULTIPLE_TABLES=y" to do such wicked things.
I had such setup when I had two net providers and wanted two different
vservers to go respectively through them.
But, I think the simpler solution is to just -j SNAT all your outgoing
packets.
-- Key fingerprint = 40D0 9FFB 9939 7320 8294 05E0 BCC7 02C4 75CC 50D9 Namagumi namagomi namagoroshi _______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver