Re: ipchains -> iptables SOLVED :)

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

 



----- Original Message ----- 
From: "Alexander Dalloz" <alexander.dalloz@xxxxxxxxxxxxxxxx>
To: "For users of Fedora Core releases" <fedora-list@xxxxxxxxxx>
Sent: Sunday, October 10, 2004 6:12 PM
Subject: Re: ipchains -> iptables


> Am So, den 10.10.2004 schrieb Janis K um 16:59:

> 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?

> 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

> The iptables rules is created, so _the command does work_.

Oh, I'm sorry. Of course, the command works.

> 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?

> From what do you conclude that iptables does not work?

> cat /proc/sys/net/ipv4/ip_forward

> If that does not give back the value of 1 then forwarding is off. Then
> edit /etc/sysctl.conf, make sure it has an entry

> # Controls IP packet forwarding
> net.ipv4.ip_forward = 1

> Run then "sysctl -p".

> Alexander

Thanks a lot, Alexander. I had "net.ipv4.ip_forward = 0" in
"/etc/sysctl.conf". So I changed to 1 and ran "sysctl -p" and now everything
works fine :)

Thanks again :)




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

  Powered by Linux