All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Schaaf <bof@bof.de>
To: "ISLERO77@telefonica.net" <ISLERO77@telefonica.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: Easy question, how to use stdio.h
Date: Tue, 22 Apr 2003 20:26:07 +0200	[thread overview]
Message-ID: <20030422182607.GC3374@oknodo.bof.de> (raw)
In-Reply-To: <ead0eeb154.eb154ead0e@teleline.es>

> And now I was trying to load in a file the source and the dest 
> ports of the packets. 

I would do it this way:

while read sport dport; do
	iptables -t whatever -A WHEREEVER \
		-m TCP --sport $sport --dport $dport -j DOSOMETHING
done <inputfile

and variations thereof.

If you could indicate suitable values of whatever, WHEREEVER, TCP,
and DOSOMETHING, we could maybe try to understand what task you
have to solve. That may lead to suitable proposals on how to
proceed.

Questions:

- do you really mean 'source AND dest ports'? That's what leads me
  to the above iptables command.
- when the file changes, what do you expect to happen?

best regards
  Patrick

  reply	other threads:[~2003-04-22 18:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22 17:27 Easy question, how to use stdio.h ISLERO77
2003-04-22 18:26 ` Patrick Schaaf [this message]
2003-04-22 22:33 ` Markus Schaber
  -- strict thread matches above, loose matches on Subject: below --
2003-04-22 17:14 ISLERO77
2003-04-22 16:15 ISLERO77
2003-04-22 17:05 ` Markus Schaber
2003-04-22 17:14 ` Patrick Schaaf

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=20030422182607.GC3374@oknodo.bof.de \
    --to=bof@bof.de \
    --cc=ISLERO77@telefonica.net \
    --cc=netfilter-devel@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 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.