* iptables-problem
@ 2005-03-26 17:30 amir_sarbazi
2005-03-26 19:13 ` iptables-problem Francois Romieu
0 siblings, 1 reply; 2+ messages in thread
From: amir_sarbazi @ 2005-03-26 17:30 UTC (permalink / raw)
To: netdev
Hi all
I have a Lan with range IP:192.168.1.0/24 that
192.168.1.3 is my webserver.
& have a firewall with 2 eth (eth0:192.168.1.2)
& (eth1:217.218.68.20) .
I want when firewall get web request packet
with eth1 then give it to eth0 & eth0 send
packet to 192.168.1.3:80.
I used these iptables that SNAT didn't work(Bad
argument):
iptables -A PREROUTING -t nat -p tcp -d
217.218.68.20 --dport 80 -j SNAT --to
192.168.1.2:80
or(--to-source 192.168.1.3:80)
But DNAT is working good:
iptables -A PREROUTING -t nat -p tcp -d
217.218.68.20 --dport 80 -j DNAT --to
192.168.1.3
with regards.
amir sarbazi
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: iptables-problem
2005-03-26 17:30 iptables-problem amir_sarbazi
@ 2005-03-26 19:13 ` Francois Romieu
0 siblings, 0 replies; 2+ messages in thread
From: Francois Romieu @ 2005-03-26 19:13 UTC (permalink / raw)
To: backslash46; +Cc: netdev
amir_sarbazi <amir.sarbazi@gmail.com> :
[...]
> I used these iptables that SNAT didn't work(Bad
> argument):
> iptables -A PREROUTING -t nat -p tcp -d 217.218.68.20 --dport 80 \
> -j SNAT --to 192.168.1.2:80 or(--to-source 192.168.1.3:80)
$ LANG=en_US man 8 iptables
[...]
SNAT
This target is only valid in the nat table, in the POSTROUTING chain.
^^^^^^^^^^^
--
Ueimor
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-03-26 19:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-26 17:30 iptables-problem amir_sarbazi
2005-03-26 19:13 ` iptables-problem Francois Romieu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).