Linux Netfilter discussions
 help / color / mirror / Atom feed
From: cc <cc@kdtc.net>
To: Netfilter Group <netfilter@lists.netfilter.org>
Subject: Re: Adding Telnet to a Working Setup
Date: Fri, 29 Aug 2003 16:33:15 +0800	[thread overview]
Message-ID: <3F4F0FCB.3050402@kdtc.net> (raw)
In-Reply-To: <023a01c36ca1$54a1f320$0500a8c0@emph05>

Alyn Ashworth wrote:

> I have a working iptables setup that uses the following script, and that I
> would like to change to allow telnet connexions from the local network
> (eth0) but nor from ppp0. Can anyone suggest the best way to do this

Telnet connections into your firewall from the local net?

But haven't you already done that already with your first INPUT rule and
your  3rd Output rule?

> iptables -A INPUT -p ALL -i eth0 -s 192.168.0.0/16 -j ACCEPT
> iptables -A OUTPUT -p ALL -s 192.168.0.0/24 -j ACCEPT

Or did I completely miss the point?

> # (3) INPUT chain rules
> 
> # Rules for incoming pakets from LAN
> iptables -A INPUT -p ALL -i eth0 -s 192.168.0.0/16 -j ACCEPT
> iptables -A INPUT -p ALL -i lo -s 127.0.0.1 -j ACCEPT
> iptables -A INPUT -p ALL -i lo -s 192.168.0.0/16 -j ACCEPT

I don't understand why or how packets from 'lo' could
come from anything but 127.0.0.1?  Isn't the 3rd rule meaningless?
Or am I seriously mistaken?

> # (5) OUTPUT chain rules
> # only output packets with local addreses (no spoofing)
> iptables -A OUTPUT -p ALL -s 127.0.0.1 -j ACCEPT
> iptables -A OUTPUT -p ALL -s 192.168.0.88 -j ACCEPT
> iptables -A OUTPUT -p ALL -s 192.168.0.0/24 -j ACCEPT

Isn't the 2nd made redundant by the 3rd rule?  If given
rule #3, you don't need rule #2.

It's definitely a good way to learn if someone can correct
my mistakes in understanding your scripts.

Thanks










      parent reply	other threads:[~2003-08-29  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-27 13:44 Adding Telnet to a Working Setup Alyn Ashworth
2003-08-29  7:11 ` Ralf Spenneberg
2003-08-29  8:33 ` cc [this message]

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=3F4F0FCB.3050402@kdtc.net \
    --to=cc@kdtc.net \
    --cc=netfilter@lists.netfilter.org \
    /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