All of lore.kernel.org
 help / color / mirror / Atom feed
* Filtered address in can login
@ 2005-08-16 14:44 vladimir
  2005-08-16 17:34 ` Nikolai Alexandrov
  2005-08-17  5:06 ` Grant Taylor
  0 siblings, 2 replies; 5+ messages in thread
From: vladimir @ 2005-08-16 14:44 UTC (permalink / raw)
  To: netfilter

Hi, I have iptables-1.2.7a and 2.4.26 kernel and there is something
strange.
I have the following rule:
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -s 0/0 --protocol tcp --destination-port 80 -j ACCEPT
iptables -A INPUT -s IP_ADDR  --protocol tcp --destination-port 22  -j
ACCEPT
iptables -A INPUT -p tcp --syn -j DROP

So I expect that only  the specified IP_ADDR can ssh to port 22 in my
server.
But in /var/log/secure I see that some other IP's for example
168.179.113.141 try to login to ssh  with different user names to my
server.
However, then I try ssh to that server not from IP_ADDR I can not, as
expected.
Please tell me how this 168.179.113.141 bypass my firewall.
Thank you very much, 
Vladimir
-- 

www.FetchBook.Info
Find the lowest price - Compare more than a hundred book stores in a
click



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

* Re: Filtered address in can login
  2005-08-16 14:44 Filtered address in can login vladimir
@ 2005-08-16 17:34 ` Nikolai Alexandrov
  2005-08-17  5:06 ` Grant Taylor
  1 sibling, 0 replies; 5+ messages in thread
From: Nikolai Alexandrov @ 2005-08-16 17:34 UTC (permalink / raw)
  To: vladimir; +Cc: netfilter

Are you sure your default POLICIES are ok? I mean...
do you have somewhere:
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
... your script ...
iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

You should also consider adding rules for the DNS to work.


vladimir wrote:

>Hi, I have iptables-1.2.7a and 2.4.26 kernel and there is something
>strange.
>I have the following rule:
>iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
>iptables -A INPUT -s 0/0 --protocol tcp --destination-port 80 -j ACCEPT
>iptables -A INPUT -s IP_ADDR  --protocol tcp --destination-port 22  -j
>ACCEPT
>iptables -A INPUT -p tcp --syn -j DROP
>
>So I expect that only  the specified IP_ADDR can ssh to port 22 in my
>server.
>But in /var/log/secure I see that some other IP's for example
>168.179.113.141 try to login to ssh  with different user names to my
>server.
>However, then I try ssh to that server not from IP_ADDR I can not, as
>expected.
>Please tell me how this 168.179.113.141 bypass my firewall.
>Thank you very much, 
>Vladimir
>  
>


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

* Re: Filtered address in can login
  2005-08-16 14:44 Filtered address in can login vladimir
  2005-08-16 17:34 ` Nikolai Alexandrov
@ 2005-08-17  5:06 ` Grant Taylor
  2005-08-17  5:43   ` Jan Engelhardt
  1 sibling, 1 reply; 5+ messages in thread
From: Grant Taylor @ 2005-08-17  5:06 UTC (permalink / raw)
  To: netfilter

The only thing that comes to mind is that 168.79.113.141 might be getting in under the "--state RELATED" rule if you had an outgoing connection to that IP it would possibly be able to get back in.



Grant. . . .

vladimir wrote:
> Hi, I have iptables-1.2.7a and 2.4.26 kernel and there is something
> strange.
> I have the following rule:
> iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
> iptables -A INPUT -s 0/0 --protocol tcp --destination-port 80 -j ACCEPT
> iptables -A INPUT -s IP_ADDR  --protocol tcp --destination-port 22  -j
> ACCEPT
> iptables -A INPUT -p tcp --syn -j DROP
> 
> So I expect that only  the specified IP_ADDR can ssh to port 22 in my
> server.
> But in /var/log/secure I see that some other IP's for example
> 168.179.113.141 try to login to ssh  with different user names to my
> server.
> However, then I try ssh to that server not from IP_ADDR I can not, as
> expected.
> Please tell me how this 168.179.113.141 bypass my firewall.
> Thank you very much, 
> Vladimir



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

* Re: Filtered address in can login
  2005-08-17  5:06 ` Grant Taylor
@ 2005-08-17  5:43   ` Jan Engelhardt
  2005-08-17  5:46     ` Grant Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2005-08-17  5:43 UTC (permalink / raw)
  To: Grant Taylor; +Cc: netfilter


> The only thing that comes to mind is that 168.79.113.141 might be getting in
> under the "--state RELATED" rule if you had an outgoing connection to that IP
> it would possibly be able to get back in.

Heh, webserver hacked?

>> iptables -A INPUT -s 0/0 --protocol tcp --destination-port 80 -j ACCEPT



Jan Engelhardt
-- 
| Alphagate Systems, http://alphagate.hopto.org/


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

* Re: Filtered address in can login
  2005-08-17  5:43   ` Jan Engelhardt
@ 2005-08-17  5:46     ` Grant Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Taylor @ 2005-08-17  5:46 UTC (permalink / raw)
  To: netfilter

Possibly, but I hate to speculate.



Grant. . . .

Jan Engelhardt wrote:
> Heh, webserver hacked?


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

end of thread, other threads:[~2005-08-17  5:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-16 14:44 Filtered address in can login vladimir
2005-08-16 17:34 ` Nikolai Alexandrov
2005-08-17  5:06 ` Grant Taylor
2005-08-17  5:43   ` Jan Engelhardt
2005-08-17  5:46     ` Grant Taylor

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.