Re: Very basic question.

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

 



	Hello,

> I have tried the following, but it just seems to redirect all traffic to the
> local firewall:
> iptables -t nat -A POSTROUTING -o eth1 -s 192.168.10.2 -j SNAT --to
> 213.249.230.206

	1. -o = output interface. Your local network is connected to eth1,
wright? And you want to NAT all connections from 192.168.10.2 to
internet as 213.249.230.206, wright?
iptables -t nat -A POSTROUTING -o eth2 -s 192.168.10.2/32 -j SNAT
--to-source 213.249.230.206

> iptables -t nat -A PREROUTING -i eth2 -s 213.249.230.206 -j DNAT --to
> 192.168.10.2

	2. -s = source. You want redirect the traffic that comes from the
internet which destination is 213.249.230.206 to your internal pc
192.168.10.2, wright? 
iptables -t nat -A PREROUTING -i eth2 -d 213.249.230.206 -j DNAT
--to-destination 192.168.10.2


Regards,
-- 
--
Alejandro Flores
http://www.triforsec.com.br/
http://www.defenselayer.com/


[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