Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "Rob Sterenborg" <rob@sterenborg.info>
To: Nikolai Georgiev <voyager123bg@gmail.com>
Cc: "Ashley M. Kirchner" <ashley@pcraft.com>, netfilter@lists.netfilter.org
Subject: Re: Re: iptables problem
Date: Wed, 2 Nov 2005 09:01:27 +0100 (CET)	[thread overview]
Message-ID: <56523.193.173.147.3.1130918487.squirrel@webmail.sterenborg.info> (raw)
In-Reply-To: <436868D1.4080508@gmail.com>

On Wed, November 2, 2005 08:20, Nikolai Georgiev wrote:
>>    Problem is that while they can connect OUT, nothing from the
>> outside can connect to them.
>>
> Hello there, i think this should do
> iptables -P INPUT DROP
> iptables -P OUTPUT DROP
> iptables -A INPUT --dst $YOUR_IP -m state --state ESTABLISHED,RELATED
> -j ACCEPT
> iptables -A OUTPUT --src $YOUR_IP -m state --state
> NEW,ESTABLISHED,RELATED -j ACCEPT

The INPUT and OUTPUT chains are for local traffic.
These kiosk hosts are probably *behind* iptables, so traffic will
travel through the FORWARD chain.

If you need external connections forwarded to hosts behind the
firewall, you need DNAT rules to make it happen.

In this case, the OP has 3 hosts to wich he wants to connect ("nothing
from the outside can connect to them", outgoing connections are
already working).
FTP only uses port 21/tcp (and 20). It's to my knowledge not possible
to forward 1 port to 3 hosts simultaneously (if that would do any
good), so he'll need to assign different ports for the second and
third host.
Something like :
21/tcp -> host 1
41/tcp -> host 2
61/tcp -> host 3
(if these ports are free).


Gr,
Rob




  reply	other threads:[~2005-11-02  8:01 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01 18:06 iptables problem Ashley M. Kirchner
2005-11-02  0:31 ` Buddy wu
2005-11-02  1:29   ` Ashley M. Kirchner
2005-11-02  1:37     ` Buddy wu
2005-11-02  5:56     ` Rob Sterenborg
2005-11-02  7:20     ` Nikolai Georgiev
2005-11-02  8:01       ` Rob Sterenborg [this message]
2005-11-02 22:49         ` Ashley M. Kirchner
2005-11-03  6:19           ` Rob Sterenborg
2005-11-03  6:45             ` Ashley M. Kirchner
2005-11-03 15:21               ` Re: iptables problem (nfcan: addressed to exclusive sender for this address) Jim Laurino
2005-11-03 16:02                 ` Ashley M. Kirchner
2005-11-03 16:23                   ` Sven Schuster
2005-11-03 17:17                     ` Re: iptables problem (nfcan: addressed to exclusivesender " Rob Sterenborg
2005-11-03 17:00                   ` Re: iptables problem (nfcan: addressed to exclusive (nfcan: addressed to exclusive sender for this address) sender " Jim Laurino
2005-11-03 19:57                     ` Ashley M. Kirchner
2005-11-04  5:00                       ` Re: iptables problem (nfcan: addressed to exclusive (nfcan: addressed to exclusive sender for this address) " Jim Laurino
2005-11-04  5:06                         ` Ashley M. Kirchner
2005-11-04  6:04                           ` Rob Sterenborg
2005-11-03 21:54             ` Re: iptables problem R. DuFresne
2005-11-04  0:51               ` Ashley M. Kirchner
2005-11-04  3:18                 ` R. DuFresne
2005-11-04  4:26                   ` Ashley M. Kirchner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56523.193.173.147.3.1130918487.squirrel@webmail.sterenborg.info \
    --to=rob@sterenborg.info \
    --cc=ashley@pcraft.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=voyager123bg@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox