* Destination Nat Loopback Clarified !
@ 2002-07-10 16:29 Mark Ayad
2002-07-10 16:59 ` Tom Eastep
0 siblings, 1 reply; 2+ messages in thread
From: Mark Ayad @ 2002-07-10 16:29 UTC (permalink / raw)
To: netfilter
I though I'd try and clarify the problem.
----------------------
[A]
IP 192.168.0.3
MASK: 255.255.255.0
GATE: 192.168.0.1
HTTP Server
192.168.0.3 :80
---------------------
| 192.168.0.3 [mask 255.255.255.0]
|
|
|
| eth1 192.168.0.1 [mask 255.255.255.0]
----------------------
[B]
MASQ Gateway
Firewall
----------------------
|eth0 A.B.D.C DHCP
|
|
|
Internet
#######################################################
#Working MASQ Gateway + Port Forwarding on 80 to 192.168.0.3
EXTIF="eth0"
INTIF="eth1"
$IPTABLES -A INPUT -p tcp --syn --destination-port 80 -j ACCEPT
$IPTABLES -A INPUT -p tcp --syn -j DROP
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $INTIF -j ACCEPT
$IPTABLES -A FORWARD -j LOG
$IPTABLES -t nat -A PREROUTING -p tcp -i eth0 --dport \
80 -j DNAT --to-destination 192.168.0.3:80
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
#######################################################
What I can't do and I've tried all your suggestions which on the face of it
might actually be more complex than it first seems:
[A] both the HTTP server 192.168.0.3:80 and a Client that connects to the
gateway via eth1 192.168.0.1 [B] which is a MASQ gateway that routes
everything to the DHCP assigned IP A.B.D.C on eth0.
The DHCP public IP A.B.C.D can be reached via a Public name. So back to my
original problem [that ain't going away] Host [A] in a web browser whishes
to connect to itself but it uses the public IP address a.k.a A.B.D.C which
is prerouted to 192.168.0.3:80.
So Infact we have a glorfied LOOP-BACK-ADAPTER do we not ? Futile I know,
but the only other option to test that the HTTP server 192.168.0.3:80 on A
can be reached by some one on the internet using the DHCP assigned IP
A.B.D.C on eth0 is to use a anonymous web proxy to simulate a true ouside
request.
This has nearly go me licked, and so far there is no answer ?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-10 16:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-10 16:29 Destination Nat Loopback Clarified ! Mark Ayad
2002-07-10 16:59 ` Tom Eastep
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox