All of lore.kernel.org
 help / color / mirror / Atom feed
* Port forwarding
@ 2008-12-12 23:33 Błażej Ślusarek
  2008-12-13 16:36 ` Elvir Kuric
  2009-02-04 17:48 ` Błażej Ślusarek
  0 siblings, 2 replies; 5+ messages in thread
From: Błażej Ślusarek @ 2008-12-12 23:33 UTC (permalink / raw)
  To: netfilter

Hello, could anyone help me to enable port forwarding on a server
which default policies are PREROUTING DROP and FORWARD DROP? I'm
actually asking for a correct set of instructions.

Thanks.

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

* Re: Port forwarding
  2008-12-12 23:33 Port forwarding Błażej Ślusarek
@ 2008-12-13 16:36 ` Elvir Kuric
  2009-02-04 17:48 ` Błażej Ślusarek
  1 sibling, 0 replies; 5+ messages in thread
From: Elvir Kuric @ 2008-12-13 16:36 UTC (permalink / raw)
  To: Błażej Ślusarek; +Cc: netfilter

Hi Blazej,

take a look in : http://iptables-tutorial.frozentux.net/iptables-tutorial.html

it is super place for reference,

Nice regards,

Elvir Kuric

On Sat, Dec 13, 2008 at 12:33 AM, B³a¿ej ¦lusarek <beju@beju.xon.pl> wrote:
> Hello, could anyone help me to enable port forwarding on a server
> which default policies are PREROUTING DROP and FORWARD DROP? I'm
> actually asking for a correct set of instructions.
>
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: Port forwarding
  2008-12-12 23:33 Port forwarding Błażej Ślusarek
  2008-12-13 16:36 ` Elvir Kuric
@ 2009-02-04 17:48 ` Błażej Ślusarek
  2009-02-04 18:38   ` Ivan Petrushev
  1 sibling, 1 reply; 5+ messages in thread
From: Błażej Ślusarek @ 2009-02-04 17:48 UTC (permalink / raw)
  To: netfilter

Does really nobody know how to do port forwarding?

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

* Re: Port forwarding
  2009-02-04 17:48 ` Błażej Ślusarek
@ 2009-02-04 18:38   ` Ivan Petrushev
  2009-02-04 21:04     ` conntrack counters on a bridge Gilad Benjamini
  0 siblings, 1 reply; 5+ messages in thread
From: Ivan Petrushev @ 2009-02-04 18:38 UTC (permalink / raw)
  To: Błażej Ślusarek; +Cc: netfilter

I think lots of people know how to forward ports.
Default policy doesn't concern you - it is DEFAULT. Once you add rules
that match the desired packets these rules do something and it is not
the default chain action.
Here is example port forwarding:
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2 --dport 27015 -j
DNAT --to-destination 192.168.0.34
iptables -t nat -A PREROUTING -p udp -d 192.168.1.2 --dport 27015 -j
DNAT --to-destination 192.168.0.34
And if your default FORWARD policy is DROP, then you should change it
to ACCEPT for the matched by the upper rules packets:
iptables -I FORWARD -d 192.168.1.2 -j ACCEPT

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

* conntrack counters on a bridge
  2009-02-04 18:38   ` Ivan Petrushev
@ 2009-02-04 21:04     ` Gilad Benjamini
  0 siblings, 0 replies; 5+ messages in thread
From: Gilad Benjamini @ 2009-02-04 21:04 UTC (permalink / raw)
  To: netfilter

I have iptables running on a bridge. The bridge has three interfaces

I am trying to understand what happens with flooded packets.
Below are my conclusions. I would appreciate comments and corrections. If
someone has a relevant link, that's even better.

- Flooding is done by the bridge code, and therefore flooded packets are
seen twice in the FORWARD chain
- Conntrack counters are updated in PRE_ROUTING, and therefore 
   - The connection counters are correct (not duplicate)
   - Counters are also updated for packets which are eventually dropped
- Conntrack confirms connections in POST_ROUTING, and therefore
   - Dropped connections are not confirmed
   - Accepted connections are confirmed twice, and that's harmless ?

Thanks
Gilad 


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

end of thread, other threads:[~2009-02-04 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-12 23:33 Port forwarding Błażej Ślusarek
2008-12-13 16:36 ` Elvir Kuric
2009-02-04 17:48 ` Błażej Ślusarek
2009-02-04 18:38   ` Ivan Petrushev
2009-02-04 21:04     ` conntrack counters on a bridge Gilad Benjamini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.