* DNAT failure
@ 2005-11-04 21:30 P theodorou
2005-11-05 9:49 ` P theodorou
0 siblings, 1 reply; 2+ messages in thread
From: P theodorou @ 2005-11-04 21:30 UTC (permalink / raw)
To: netfilter
Hello
I face problem with DNAT this is my testing script
INET_IP="84.9.x.x"
INET_IFACE="eth0"
LAN_IP="192.168.0.1"
LAN_IFACE="eth1"
DMZ_HTTP_IP="192.168.0.4"
O_IFACE="lo"
LO_IP="127.0.0.1"
IPTABLES="/usr/sbin/iptables"
/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe ip_conntrack
/sbin/modprobe iptable_filter
/sbin/modprobe iptable_mangle
/sbin/modprobe iptable_nat
/sbin/modprobe ipt_LOG
/sbin/modprobe ipt_limit
/sbin/modprobe ipt_state
echo "1" > /proc/sys/net/ipv4/ip_forward
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
$IPTABLES -t nat -A PREROUTING -p tcp -d $INET_IP --dport 80 \
-j DNAT --to-destination $DMZ_HTTP_IP
$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to-source $INET_IP
i do not have a clue what the problem but whenever i type
the real ip on the browser i get error page doesn't exist .
any hint would be really appreciated
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: DNAT failure
2005-11-04 21:30 DNAT failure P theodorou
@ 2005-11-05 9:49 ` P theodorou
0 siblings, 0 replies; 2+ messages in thread
From: P theodorou @ 2005-11-05 9:49 UTC (permalink / raw)
To: netfilter
I have noticed that DNAT works whenever redirect to eth1 but not eth2
like here
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 --dport 80 \
-j DNAT --to-destination 192.168.0.4 (eth1)
but when i try
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 --dport 80 \
-j DNAT --to-destination 192.168.1.4 (eth2)
>From: "P theodorou" <props666999@hotmail.com>
>To: netfilter@lists.netfilter.org
>Subject: DNAT failure Date: Fri, 04 Nov 2005 21:30:32 +0000
>
>Hello
>
>I face problem with DNAT this is my testing script
>
>INET_IP="84.9.x.x"
>INET_IFACE="eth0"
>
>LAN_IP="192.168.0.1"
>LAN_IFACE="eth1"
>DMZ_HTTP_IP="192.168.0.4"
>
>
>O_IFACE="lo"
>LO_IP="127.0.0.1"
>
>
>IPTABLES="/usr/sbin/iptables"
>
>
>/sbin/depmod -a
>
>
>
>
>/sbin/modprobe ip_tables
>/sbin/modprobe ip_conntrack
>/sbin/modprobe iptable_filter
>/sbin/modprobe iptable_mangle
>/sbin/modprobe iptable_nat
>/sbin/modprobe ipt_LOG
>/sbin/modprobe ipt_limit
>/sbin/modprobe ipt_state
>
>
>
>echo "1" > /proc/sys/net/ipv4/ip_forward
>
>
>
>$IPTABLES -P INPUT ACCEPT
>$IPTABLES -P OUTPUT ACCEPT
>$IPTABLES -P FORWARD ACCEPT
>
>
>
>$IPTABLES -t nat -A PREROUTING -p tcp -d $INET_IP --dport 80 \
>-j DNAT --to-destination $DMZ_HTTP_IP
>
>
>
>$IPTABLES -t nat -A POSTROUTING -o $INET_IFACE -j SNAT --to-source $INET_IP
>
>
>
>i do not have a clue what the problem but whenever i type
>the real ip on the browser i get error page doesn't exist .
>
>any hint would be really appreciated
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-05 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 21:30 DNAT failure P theodorou
2005-11-05 9:49 ` P theodorou
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).