Linux Netfilter discussions
 help / color / mirror / Atom feed
* forwarding rule (internal webserver) HELLPP!!
@ 2004-03-15 19:10 arif
  2004-03-16  2:13 ` Alexander Samad
  0 siblings, 1 reply; 3+ messages in thread
From: arif @ 2004-03-15 19:10 UTC (permalink / raw)
  To: netfilter

Anyone know why the following rule does not work when
i use SNAT but does when i use MASQUERADE??

/sbin/iptables -A PREROUTING -t nat -p tcp -d 63.x.x.x
--dport 80 -j DNAT --to 10.0.0.3:80

When I use the following rule, the previous rule
works: 
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j
MASQUERADE

but when i do it like this, i just get a connection
refused from the outside:
/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o
eth0 -j SNAT --to-source 63.203.63.246

Both work as far as NAT'ing my internal hosts, but i
cant get the darn forward to work! thanks!! :)

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: forwarding rule (internal webserver) HELLPP!!
  2004-03-15 19:10 forwarding rule (internal webserver) HELLPP!! arif
@ 2004-03-16  2:13 ` Alexander Samad
  2004-03-16 17:32   ` arif
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Samad @ 2004-03-16  2:13 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

On Mon, Mar 15, 2004 at 11:10:20AM -0800, arif wrote:
> Anyone know why the following rule does not work when
> i use SNAT but does when i use MASQUERADE??
> 
> /sbin/iptables -A PREROUTING -t nat -p tcp -d 63.x.x.x
> --dport 80 -j DNAT --to 10.0.0.3:80
> 
> When I use the following rule, the previous rule
> works: 
> /sbin/iptables -t nat -A POSTROUTING -o eth1 -j
> MASQUERADE
> 
> but when i do it like this, i just get a connection
> refused from the outside:
> /sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o
> eth0 -j SNAT --to-source 63.203.63.246

Not sure if its a typo MASQ is for eth1 and the SNAT is for eth0 

> 
> Both work as far as NAT'ing my internal hosts, but i
> cant get the darn forward to work! thanks!! :)
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com
> 
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: forwarding rule (internal webserver) HELLPP!!
  2004-03-16  2:13 ` Alexander Samad
@ 2004-03-16 17:32   ` arif
  0 siblings, 0 replies; 3+ messages in thread
From: arif @ 2004-03-16 17:32 UTC (permalink / raw)
  To: netfilter


--- Alexander Samad <alex@samad.com.au> wrote:
> On Mon, Mar 15, 2004 at 11:10:20AM -0800, arif
> wrote:
> > Anyone know why the following rule does not work
> when
> > i use SNAT but does when i use MASQUERADE??
> > 
> > /sbin/iptables -A PREROUTING -t nat -p tcp -d
> 63.x.x.x
> > --dport 80 -j DNAT --to 10.0.0.3:80
> > 
> > When I use the following rule, the previous rule
> > works: 
> > /sbin/iptables -t nat -A POSTROUTING -o eth1 -j
> > MASQUERADE
> > 
> > but when i do it like this, i just get a
> connection
> > refused from the outside:
> > /sbin/iptables -t nat -A POSTROUTING -s
> 10.0.0.0/24 -o
> > eth0 -j SNAT --to-source 63.203.63.246
> 
> Not sure if its a typo MASQ is for eth1 and the SNAT
> is for eth0 
> 
> > 
> > Both work as far as NAT'ing my internal hosts, but
> i
> > cant get the darn forward to work! thanks!! :)
> > 

yes, you are correct, i made a typo - the MASQ rule
should read:
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j
MASQUERADE

i still can't get this port forward to work no matter
what i try with SNAT, i guess i will just use
masquerade although i really wish i knew why i can't
get it to work with SNAT :(

__________________________________
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-16 17:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-15 19:10 forwarding rule (internal webserver) HELLPP!! arif
2004-03-16  2:13 ` Alexander Samad
2004-03-16 17:32   ` arif

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox