Re: updated iptables doesn't work with old rules

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

 



> And both NIC's have a /24 subnet ? If so, you should change that, eg. eth0:
> 192.168.10.0/24 and eth1: 192.168.11.0/24 (in which case machine B should
> also
> be in 192.168.11.0/24).
> Right now I think you (may) have a routing problem.
>
> Something like :
>
> Kernel IP routing table
> Destination     Gateway         Genmask         Iface
> 192.168.10.0    192.168.10.1    255.255.255.0   eth0
> 192.168.11.0    192.168.11.1    255.255.255.0   eth1
> 0.0.0.0         192.168.10.1    0.0.0.0         eth0
>
> echo 0 > /proc/sys/net/ipv4/ip_forward
> $ipt -P FORWARD DROP
> $ipt -F FORWARD
> $ipt -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
> $ipt -A FORWARD -m state --state NEW -i eth1 -o eth0 \
>   -s 192.168.11.0/24 -j ACCEPT
> $ipt -t nat -F POSTROUTING
> $ipt -t nat -A POSTROUTING -o eth0 -j SNAT --to 192.168.10.101
> echo 1 > /proc/sys/net/ipv4/ip_forward


Thanks a lot, I'll try this in the evening.




On 2/22/06, Ben Lentz <BLentz@xxxxxxxxxxxxxxxxx> wrote:
> To answer this question, can you get on the Internet from
> machine A? ping sourceforge.net?
>

Yes, from 'machine A' it is possible to connect to the internet. And
it is possible to ssh from 'machine B' to 'machine A' and then access
the internet. The only problem is (I think) with packet
forwarding/masquareding, since 'macine A' doesn't want to let the
packets from 'machine B' through.



[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