Linux Netfilter discussions
 help / color / mirror / Atom feed
* simple config question
@ 2004-03-28  2:58 Eric McAfee
  2004-03-28  8:17 ` Antony Stone
  2004-03-28  9:53 ` Frederic de Villamil
  0 siblings, 2 replies; 3+ messages in thread
From: Eric McAfee @ 2004-03-28  2:58 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 251 bytes --]

I need to know the iptables command that would restrict all access to my server except for my computer's Dreamweaver program and ccbill's access to my password file. I know it would be some variation of:
iptables -A INPUT -i ppp0 -p tcp --syn -j DROP

[-- Attachment #2: Type: text/html, Size: 614 bytes --]

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

* Re: simple config question
  2004-03-28  2:58 simple config question Eric McAfee
@ 2004-03-28  8:17 ` Antony Stone
  2004-03-28  9:53 ` Frederic de Villamil
  1 sibling, 0 replies; 3+ messages in thread
From: Antony Stone @ 2004-03-28  8:17 UTC (permalink / raw)
  To: netfilter

On Sunday 28 March 2004 3:58 am, Eric McAfee wrote:

> I need to know the iptables command that would restrict all access to my
> server except for my computer's Dreamweaver program and ccbill's access to
> my password file. I know it would be some variation of:
> iptables -A INPUT -i ppp0 -p tcp --syn -j DROP

That rule will definitely block all TCP access via ppp0 to the machine.

All you need to do next is insert before that rule something suitable to allow 
the connections you mentioned.

I can't quite figure out from the description you gave what network protocols 
you are talking about however, so I can't suggest what rules they need to be, 
however if you're not sure either, a simple LOGging rule should help you work 
out what is needed:

iptables -I INPUT -i ppp0 -p tcp -s a.b.c.d -j LOG

where a.b.c.d is the IP address of a machine you want to allow access.   The 
LOG will show you what packets arrive, just before they get DROPped, so you 
should be able to work out from that what rule to add to ACCEPT them instead.

Regards,

Antony.

-- 
This is not a rehearsal.
This is Real Life.

                                                     Please reply to the list;
                                                           please don't CC me.



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

* Re: simple config question
  2004-03-28  2:58 simple config question Eric McAfee
  2004-03-28  8:17 ` Antony Stone
@ 2004-03-28  9:53 ` Frederic de Villamil
  1 sibling, 0 replies; 3+ messages in thread
From: Frederic de Villamil @ 2004-03-28  9:53 UTC (permalink / raw)
  To: Eric McAfee; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 758 bytes --]

On Sat, 27 Mar 2004, Eric McAfee wrote:

> I need to know the iptables command that would restrict all access to my server except for my computer's Dreamweaver program and ccbill's access to my password file. I know it would be some variation of:
> iptables -A INPUT -i ppp0 -p tcp --syn -j DROP

Hi,
what  you're going  to do  is drop  every new  TCP connection  to your
interface ppp0.

What you want to to should be something like that

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A OUTPUT -s 127.0.0.1 -j ACCEPT

iptables -A INPUT -s $MACHINE -j ACCEPT
iptables -A OUTPUT -s $MACHINE -j ACCEPT

$machine is your machine IP address.

regards
Frederic
--
http://www.seclab.jp

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

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

end of thread, other threads:[~2004-03-28  9:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-28  2:58 simple config question Eric McAfee
2004-03-28  8:17 ` Antony Stone
2004-03-28  9:53 ` Frederic de Villamil

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