Re: ipchains -> iptables

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

 



----- Original Message ----- 
From: "Michael Schwendt" <fedora@xxxxxxxxxxxxxxxxx>
To: "For users of Fedora Core releases" <fedora-list@xxxxxxxxxx>
Sent: Sunday, October 10, 2004 4:40 PM
Subject: Re: ipchains -> iptables


> On Sun, 10 Oct 2004 15:33:26 +0300, Janis K wrote:
>
> > Hello Fedora List users
> >
> >
> > I have Googled through the many sites and still cannot understand such
> > thing.
> >
> > Before I migrated from Debian to FC2, i used this:
> > "/sbin/ipchains -A forward -s 192.168.0.0/24 -d 0.0.0.0/0 -j MASQ" and
it
> > works perfectly.
> >
> > Now I have FC2 with kernel 2.6.5-1.358 (not yet updated) and I need the
same
> > thing using iptables command.
> >
> > please help me.
> >
> > I tried this: "/sbin/iptables -t nat -A POSTROUTING -o eth0 -s
> > 192.168.0.0/24 -j MASQUERADE"
> > but it doesn't work. When I try "/sbin/iptables -L -n" it shows nothing,
> > except empty chains INPUT, FORWARD and OUTPUT.
>
> That's because 'iptables -L' only lists the default 'filter' table
> and not the 'nat' table. Use 'iptables -t nat -L' or even better,
> 'iptables-save' to display the rules.

OK, thx for that, but why this command "/sbin/iptables -t nat -A
POSTROUTING -o eth0 -s 192.168.0.0/24 -j MASQUERADE" doesn't work?

"/sbin/iptables -L -n -t nat" shows this for the POSTROUTING:

Chain POSTROUTING (policy ACCEPT)
target        prot    opt    source        destination
MASQUERADE    all    --    192.168.0.0/24    0.0.0.0/0

but the Internet from my local machine (IP 192.168.0.2) doesn't work.

Configuration:
FC2 eth0 IP = ISP given static address
FC2 eth1 IP = 192.168.0.1 and SM 255.255.255.0

Local machine has:
IP 192.168.0.2
SM 255.255.255.0
Gateway 192.168.0.1

but still iptables doesn't work. What else is wrong here?


thx


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux