Re: dnat ouside/inside

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

 



On Tue, Feb 01, 2005 at 04:32:25PM -0200, Pablo Allietti wrote:
> hi all. i have this problem. this dnat rules work perfectly from outside
> networks example . from a cybercafe, my home and all of outside network.
> 
> but when i connect my computer insede the lan 192.168.1.x this rules
> dont working is any way to use this rules in the same network?
> 
> 
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 110  -j DNAT
> --to-destination 192.168.1.143
> iptables -A FORWARD -i eth1 -o eth0 -p tcp -s 0/0 -d 192.168.1.143
> --dport 110  -j ACCEPT
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 25  -j DNAT
> --to-destination 192.168.1.143
> iptables -A FORWARD -i eth1 -o eth0 -p tcp -s 0/0 -d 192.168.1.143
> --dport 25  -j ACCEPT
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 995  -j DNAT
> --to-destination 192.168.1.143
> iptables -A FORWARD -i eth1 -o eth0 -p tcp -s 0/0 -d 192.168.1.143
> --dport 995  -j ACCEPT
> iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 465  -j DNAT
> --to-destination 192.168.1.143
> iptables -A FORWARD -i eth1 -o eth0 -p tcp -s 0/0 -d 192.168.1.143
> --dport 465  -j ACCEPT

i've gotten out of the business of writing this email--my last known
foray is available at:

http://marc.theaimsgroup.com/?l=netfilter&m=110571844432115&w=2

-j

PS - all your nat PREROUTING rules specify "-i eth0" yet all your
     FORWARD rules specify "-i eth1" so they won't ever match the same
     packets...just an observation.

--
"Look, just give me some inner peace, or I'll mop the floor with ya!"
        --The Simpsons


[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