Linux Netfilter discussions
 help / color / mirror / Atom feed
* ssh rule
@ 2006-01-13 10:07 Britto
  2006-01-13 10:11 ` Bjørn
  0 siblings, 1 reply; 5+ messages in thread
From: Britto @ 2006-01-13 10:07 UTC (permalink / raw)
  To: netfilter

Hi 

Can you pls anyone help me correct it if i am wrong. I
have the following entries in the iptables 

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

but still i can not do ssh to linux box from the PC
which is sitting in the internal network.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


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

* Re: ssh rule
  2006-01-13 10:07 ssh rule Britto
@ 2006-01-13 10:11 ` Bjørn
  0 siblings, 0 replies; 5+ messages in thread
From: Bjørn @ 2006-01-13 10:11 UTC (permalink / raw)
  To: netfilter

Britto <britto_antony@yahoo.com> writes:

> Hi 
> 
> Can you pls anyone help me correct it if i am wrong. I
> have the following entries in the iptables 
> 
> iptables -P INPUT DROP
> iptables -P OUTPUT DROP
> iptables -P FORWARD DROP
> iptables -A INPUT -p tcp --dport 22 -j ACCEPT
> 
> but still i can not do ssh to linux box from the PC
> which is sitting in the internal network.

How do you think the server's response to your login attempts will
find the way back to you when you tell it to drop all output traffic?

Hint: Check out the ESTABLISHED and RELATED states. When you
understand what they do, use them in your output rules.

-- 
Bjørn



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

* Re: ssh rule
       [not found] <20060113101651.88870.qmail@web33404.mail.mud.yahoo.com>
@ 2006-01-13 10:28 ` Bjørn
  2006-01-13 11:07   ` Rob Sterenborg
  0 siblings, 1 reply; 5+ messages in thread
From: Bjørn @ 2006-01-13 10:28 UTC (permalink / raw)
  To: netfilter

Britto <britto_antony@yahoo.com> writes:

> Hi Bjorn,

Stop top posting. Keep replies on-list.

> What rule should i add in the OUTPUT chain?

What about the below advice was so hard to grasp?

> > Hint: Check out the ESTABLISHED and RELATED states.
> > When you
> > understand what they do, use them in your output
> > rules.


-- 
Bjørn



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

* Re: ssh rule
  2006-01-13 10:28 ` Bjørn
@ 2006-01-13 11:07   ` Rob Sterenborg
  2006-01-13 18:48     ` /dev/rob0
  0 siblings, 1 reply; 5+ messages in thread
From: Rob Sterenborg @ 2006-01-13 11:07 UTC (permalink / raw)
  To: netfilter

On Fri, January 13, 2006 11:28, Bjørn wrote:
> Britto <britto_antony@yahoo.com> writes:
>
>> Hi Bjorn,
>
> Stop top posting. Keep replies on-list.
>
>> What rule should i add in the OUTPUT chain?
>
> What about the below advice was so hard to grasp?

I guess the
-A OUTPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
part.

Or just (re)set the OUTPUT policy to ACCEPT. If you don't know how to
deal with it, it just get's in your way.

I would say : read Oskars manual :
http://iptables-tutorial.frozentux.net/iptables-tutorial.html


Gr,
Rob

>> > Hint: Check out the ESTABLISHED and RELATED states.
>> > When you
>> > understand what they do, use them in your output
>> > rules.




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

* Re: ssh rule
  2006-01-13 11:07   ` Rob Sterenborg
@ 2006-01-13 18:48     ` /dev/rob0
  0 siblings, 0 replies; 5+ messages in thread
From: /dev/rob0 @ 2006-01-13 18:48 UTC (permalink / raw)
  To: netfilter

On Friday 2006-January-13 05:07, Rob Sterenborg wrote:
> Or just (re)set the OUTPUT policy to ACCEPT. If you don't know how to
> deal with it, it just get's in your way.

That's my rule of thumb: anyone who has to ask how to make OUTPUT work 
with a DROP policy does not know enough to make that policy useful. 
Just say "iptables -P OUTPUT ACCEPT" and focus your efforts in a more 
productive direction.
-- 
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header


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

end of thread, other threads:[~2006-01-13 18:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-13 10:07 ssh rule Britto
2006-01-13 10:11 ` Bjørn
     [not found] <20060113101651.88870.qmail@web33404.mail.mud.yahoo.com>
2006-01-13 10:28 ` Bjørn
2006-01-13 11:07   ` Rob Sterenborg
2006-01-13 18:48     ` /dev/rob0

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