On Thu, Sep 4, 2008 at 10:49 PM, Alex Samad <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 04, 2008 at 08:50:39PM +1000, Chris Zhang wrote: > > Hi list, > > > > > > Suppose I have two NICs on one host, NIC A and NIC B. Is it possible to > get > > all traffic to use A, and then route them through B, and finally to > outside? > > without the aid of iptables or anything similar, e.g. just changing the > > routing table? Suppose ip forwarding works. > > not sure what you mean, but will take a stab > > if you had > > A) eth0 192.168.1.1/24 gw 192.168.1.254 > B) eth1 192.168.2.1/24 gw 192.168.2.254 > > you want something like > > ip r a default via 192.168.2.254 src 192.168.1.1 > I did the aforementioned as a test, I had to remove the current gateway before I ran this otherwise it complains about an existent route. After this is done, I tried to access www.google.com, with 'links www.google.com' netstat -tapn | grep 80 tcp 0 1 192.168.1.1:45154 74.125.19.99:80 SYN_SENT 2132/links 'route -n' gives identical information as before. It doesn't look like traffic is going through 192.168.2.1 first. I don't have 192.168.1.254 as the gateway here. But it shouldn't matter, the idea is not to pass traffic to it but pass them to 192.168.2.1 instead. This is one step closer, at least it is using 192.168.1.1 address. Thanks Alex. > so this say's all applications that attempt to open a socket without > binding to and address will get 192.168.1.1 (NIC A's address), but will > route out NIC B > > not sure if it will work, might take a bit more work > > > > > > > Just out of curiosity, does anyone know how iPhone restricts VOIP traffic > > over 3G technically? Suppose one can make a tunnel, e.g. IPSec, PPTP > (which > > iPhone has native support), to a VPN endpoint, e.g. home computer through > > 3G. Is it possible to then run a VOIP app inside the tunnel? > > > > > > Thanks, > > > > > > Chris > > -- > > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > > > > -- > "This foreign policy stuff is a little frustrating. " > > - George W. Bush > 04/23/2002 > as quoted by the New York Daily News > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iEYEARECAAYFAki/2UAACgkQkZz88chpJ2PEUQCfQghSOO2MtJPLOciEDdySceud > tA4AmwThccwoS6RHR6XrPU2TKsSmCuKO > =XaLC > -----END PGP SIGNATURE----- > > -- > SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ > Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html > -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
