Re: Forwarding packets over the same LAN

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

 



On Tue, 2009-07-14 at 14:27 +0200, Thomas Jacob wrote:
> > > You need DNAT+SNAT for this:
> > > 
> > > # Redirect to IP:Port
> > > iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 10025 \
> > > 	 -j DNAT --to-destination 172.20.1.254:25
> > > 
> > > # Ensure that the replies come back to us
> > > iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 25 \
> > >          -d 172.20.1.254  -j SNAT --to-source 172.20.1.245

Finally I managed to set it up correctly!
The problem was with another rule blocking forwarded traffic to port 25.
After I corrected the rules everything worked fine.

Thank you for your time and expertise!

Best regards,
Simion.


--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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