Linux Netfilter discussions
 help / color / mirror / Atom feed
* Port forwarding or NAT?
@ 2004-09-14 13:32 Eric Geater 9/01/04
  2004-09-14 17:13 ` Jason Opperisano
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Geater 9/01/04 @ 2004-09-14 13:32 UTC (permalink / raw)
  To: Netfilter Mailing List

I have one crazy machine at our home office that must communicate on
port 6847 to an outside company.  This one machine went through our old
proxy server until it died last week.  We're using IPTABLES through
rc.firewall-2.4 on a Linux proxy, but it doesn't seem to be allowing
this communication to occur.

Would this be handled through port forwarding or NAT?  I was under the
impression that our firewall was set up to allow all traffic, initated
from the LAN, through.  This apparently isn't the case, however.

Eric



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

* Re: Port forwarding or NAT?
  2004-09-14 13:32 Port forwarding or NAT? Eric Geater 9/01/04
@ 2004-09-14 17:13 ` Jason Opperisano
  2004-09-14 17:18 ` Rob Sterenborg
  2004-09-15  5:47 ` Alistair Tonner
  2 siblings, 0 replies; 4+ messages in thread
From: Jason Opperisano @ 2004-09-14 17:13 UTC (permalink / raw)
  To: netfilter

On Tue, 2004-09-14 at 09:32, Eric Geater 9/01/04 wrote:
> I have one crazy machine at our home office that must communicate on
> port 6847 to an outside company.  This one machine went through our old
> proxy server until it died last week.  We're using IPTABLES through
> rc.firewall-2.4 on a Linux proxy, but it doesn't seem to be allowing
> this communication to occur.
> 
> Would this be handled through port forwarding or NAT?  

it would be handled by the FORWARD chain of the filter table, and by a
SNAT/MASQ rule in the POSTROUTING chain of the nat table.

-j

-- 
Jason Opperisano <opie@817west.com>



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

* RE: Port forwarding or NAT?
  2004-09-14 13:32 Port forwarding or NAT? Eric Geater 9/01/04
  2004-09-14 17:13 ` Jason Opperisano
@ 2004-09-14 17:18 ` Rob Sterenborg
  2004-09-15  5:47 ` Alistair Tonner
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Sterenborg @ 2004-09-14 17:18 UTC (permalink / raw)
  To: 'Netfilter Mailing List'

netfilter-bounces@lists.netfilter.org wrote:
> I have one crazy machine at our home office that must
> communicate on port 6847 to an outside company.  This one
> machine went through our old proxy server until it died last
> week.  We're using IPTABLES through
> rc.firewall-2.4 on a Linux proxy, but it doesn't seem to be
> allowing this communication to occur.
> 
> Would this be handled through port forwarding or NAT?  I was
> under the impression that our firewall was set up to allow
> all traffic, initated from the LAN, through.  This apparently isn't
> the case, however. 

From inside (LAN) to outside (internet or something) = SNAT/MASQUERADE.
From outside to inside = DNAT (port forwarding).
In case of a proxy you'd probably be using Squid, and I doubt Squid will
let you communicate on port 6847.

I'm not familiar with the script so I can't say what's wrong.


Gr,
Rob



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

* Re: Port forwarding or NAT?
  2004-09-14 13:32 Port forwarding or NAT? Eric Geater 9/01/04
  2004-09-14 17:13 ` Jason Opperisano
  2004-09-14 17:18 ` Rob Sterenborg
@ 2004-09-15  5:47 ` Alistair Tonner
  2 siblings, 0 replies; 4+ messages in thread
From: Alistair Tonner @ 2004-09-15  5:47 UTC (permalink / raw)
  To: netfilter

On September 14, 2004 09:32 am, Eric Geater 9/01/04 wrote:
> I have one crazy machine at our home office that must communicate on
> port 6847 to an outside company.  This one machine went through our old
> proxy server until it died last week.  We're using IPTABLES through
> rc.firewall-2.4 on a Linux proxy, but it doesn't seem to be allowing
> this communication to occur.
>
> Would this be handled through port forwarding or NAT?  I was under the
> impression that our firewall was set up to allow all traffic, initated
> from the LAN, through.  This apparently isn't the case, however.
>
> Eric

	Not knowing what the application that is communicating in this manner is, 
will make suggestions likely off the mark.

	if you are using the proxy server to handle *outgoing* connections using its 
INSIDE ip address, you need to accept packets from the LAN in INPUT chain, 
coming to the proxy.  You will then need to let packets OUT to the internet 
from the proxy to the internet through the OUTPUT chain.  You might well get 
away with appropriate ESTABLISHED RELATED rules to allow tarffic back, but it 
is possible that you will require additional rules to let traffic in from the 
other end.  I would hope that the proxy is smart enouh to handle NATTING the 
packets to the outside IP.

	if the proxy is accepting connections from the internet and proxying them to 
the LAN, you need to accept packets from the other end in via INPUT and allow 
packets to the internal box through OUTPUT,  again, an appropriate 
ESTABLISHED, RELATED rule *should* handle traffic on the return trip.  

	Since it sounds like the proxy and firewall are the same box, the FORWARD 
chain isnt likely to be involved here.  Thus letting all traffic from LAN 
through to internet will not work here.  You have to let the traffic from the 
LAN client INTO the firewall to get to the proxy.

	Alistair Tonner


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

end of thread, other threads:[~2004-09-15  5:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-14 13:32 Port forwarding or NAT? Eric Geater 9/01/04
2004-09-14 17:13 ` Jason Opperisano
2004-09-14 17:18 ` Rob Sterenborg
2004-09-15  5:47 ` Alistair Tonner

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