Re: Sharing Limited Internet Connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 2005-September-02 23:19, David Leangen wrote:
> Can somebody please explain something to me?
>
> > # use MASQ if you get dynamic ip
> > iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
>
> What's the difference between using "-o ppp0" and "-o eth0"?
> Obviously, one is using the ppp0 interface while the other is using
> the eth0 interface.

-o specifies the output interface. "-o ppp0" matches packets routed out 
ppp0. I'll leave it as an exercise for the reader to guess which 
packets match "-o eth0".

> But in terms of what happens to the packets, what's the diff?

-o is a matching option, not a target option. The target is the same, 
"-j MASQUERADE".

> Out of curiosity, I tried both: ppp0 works, while eth0 does not.

Not having any idea what your eth0 interface is used for, I cannot 
explain that to you, but I would guess that your default route to the 
Internet uses ppp0.
-- 
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux