Re: Dnat private network HEEELP!!!
Bart De Schuymer <[email protected]> Thu, 20 Apr 2006 19:47:35 +0200
| Newsgroups | gmane.linux.network.bridge.ebtables.user |
|---|---|
| Message-ID | <[email protected]> |
Op wo, 19-04-2006 te 13:36 +0100, schreef Luigi Augello: > Hi I have the following situation > Two privete subnet (192.168.1.0/24 and 192.168.2.0/24) and a routetr with > pubblic address as some as 155.140.1.1. I would use a firewall bridged to > dnad the private networks to the router. I Tryed the follow roule but it not > work The following works fine with me (using kernel 2.6.14.2): Setup: Internet <---> router <---> bridge <---> laptop I want to DNAT pings to IP address 195.130.131.7 (google) to my router (192.168.0.1). The bridge has no IP address. #brctl addbr br0 #brctl addif br0 eth0 #brctl addif br0 eth1 #ifconfig br0 0.0.0.0 #ifconfig eth0 0.0.0.0 #ifconfig eth0 0.0.0.0 #route add -net 0.0.0.0 netmask 0.0.0.0 dev br0 #echo 1 > /proc/sys/net/ipv4/ip_forward #iptables -t nat -A PREROUTING -d 195.130.131.7 -j DNAT \ --to-destination 192.168.0.1 Something similar should work for you. If it doesn't then give a clear description of what rules you are using, what is happening to the packets and what you think should be happening. cheers, Bart ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642