http trafic redirection problems

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

 



I am running a small wifi network made of 3 computers :

1) computer A with an internet ip ( ppp0 ) and a private ip (
wlan0/192.168.0.1 .
2) computer B with two private ip ( wlan0/192.168.0.2 and wlan1
192.168.1.1 ) .
3) computer C with  a private ip ( wlan0/192.168.1.2 ) .

I am using two networks because the wifi link quality is too low between
A and C .

The computer A iptables rules are :

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE 
iptables -A FORWARD -i wlan0 -o ppp0 -j ACCEPT 

The computer B iptables rules are :
echo 1 > /proc/sys/net/ipv4/ip_forward 
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE 
iptables -A FORWARD -i wlan1 -o wlan0 -j ACCEPT

Now I want to redirect all the http trafic from computer A to B.
If I insert the rules `iptables -t nat -A PREROUTING -p tcp --dport 80
-i ppp0 -j DNAT --to 192.168.0.2:80` ,I can not access my web site (with
the public internet ip ) from my network but if  I use my ISP proxy ,I
can .

Any ideas to solve this problem ?

Thanks ,julien .


Attachment: signature.asc
Description: This is a digitally signed message part


[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