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

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_.

> 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


-- 
Alexander Dalloz | Enger, Germany | GPG key 1024D/ED695653 1999-07-13
Fedora GNU/Linux Core 2 (Tettnang) kernel 2.6.8-1.521smp 
Serendipity 17:07:06 up 10 days, 19:33, load average: 0.76, 0.69, 0.54 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


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