Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: are these enough now?
@ 2002-10-04 16:06 Clint Todish
  2002-10-04 18:34 ` Mitesh P Choksi
  0 siblings, 1 reply; 13+ messages in thread
From: Clint Todish @ 2002-10-04 16:06 UTC (permalink / raw)
  To: netfilter; +Cc: 'PayalR'


'/usr/sbin/lsof -i udp:2002' - sorry - M$OUTLOOK wants to cap that -i
for some reason.

-C 


-----Original Message-----
From: Clint Todish [mailto:ctodish@crayon.com] 
Sent: Friday, October 04, 2002 10:59 AM
To: 'netfilter@lists.netfilter.org'
Cc: 'PayalR'
Subject: RE: are these enough now?


More than likely, someone pushed over a root kit to cover their
tracks...if netstat -an doesn't show 2002 open, then you can be sure of
it. Chances are, they've also replaced ps as well to hide the
process...try: '/usr/sbin/lsof -I udp:2002' to get the PID. If you are
running a RedHat install - 'rpm -Va' and look for a '5' in the 3rd
position as that indicates a MD5 checksum difference from the binary on
your machine and the original package. 

Personally, I would recommend a reinstall as you never know for sure
what may be left lurking around.

-C

-----Original Message-----
From: netfilter-admin@lists.netfilter.org
[mailto:netfilter-admin@lists.netfilter.org] On Behalf Of Antony Stone
Sent: Friday, October 04, 2002 8:09 AM
To: netfilter@lists.netfilter.org
Subject: Re: are these enough now?


On Friday 04 October 2002 12:25 pm, PayalR wrote:

> Hi all,
> Thanks a lot for the mails.
>
> > 161 - snmp - are you managing this system from elsewhere, or is this
> > machine the snmp monitor ?   UDP 161 only needs to be inbound if
this
> > machine is being monitored from elsewhere
>
> Well, I don't know anyting about SNMP thing. But the guys at the
> server farm suggested I make some changes as told by them in my 
> snmpd.conf, so that they say I there will be able to monitor my 
> machine. I guess so I am just a client SNMP. So, which ports to keep 
> open?

UDP 161 inbound - to listen for SNMP commands
UDP 162 outbound - to generate SNMP traps

> > > Also, nmap shows that 2002/udp globe is open. Shall I close it?
> >
> > machine already has the Slapper worm on it, since that opens UDP
> > port 2002
>
> well, my machine had a slapper worm. I removed the .bugtraq file from
> /tmp. Now still the port is open. This is very important to me. How do

> I close the port???? nmap report says,
> 2002/udp   open        globe
> How do I know where and what is globe? How do I shut it?

Sorry - don't know - never had Slapper :-)   Anyone else here got any 
experience or pointers ?

> > I would recommend setting your OUTPUT chain to ESTABLISHED,RELATED
>
> do you mean similar to INPUT rule i.e using -m and all?

Yes.

Antony.

-- 

Behind the counter a boy with a shaven head stared vacantly into space,
a dozen spikes of microsoft protruding from the socket behind his ear.

 - William Gibson, Neuromancer (1984)



^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <200210041218.26636@.>]
* are these enough now?
@ 2002-10-04  7:17 PayalR
  0 siblings, 0 replies; 13+ messages in thread
From: PayalR @ 2002-10-04  7:17 UTC (permalink / raw)
  To: netfilter

Hello,
I am providing webspace, email services etc. to few institutes. I have 
drafted a firewall policy for my server. Can you please check if it is right 
and tell me if I have gone wrong anywhere? I have formulated suggestion by 
various list-members in past.

The script contains,

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A INPUT -i eth0 -p $proto --dport $port -j ACCEPT
To keep the script short in this e-mail I am replacing $proto with tcp and 
udp in each line of the actual script.
$port is replaced by,
21, 22, 23, 25, 53, 80, 110,143, 161, 162, 199, 953, ,993,3306, 8007, 8009
We are SNNP client, so I think I need 161 and 162 open, right?
Also, nmap shows that 2002/udp globe is oopen. Shall I close it?

So for e.g each line will actually look like this in the script,
iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -i eth0 -p udp --dport 25 -j ACCEPT

I understand that ACCEPT for udp for 21, 22, 23, 80, 3306 is not required. I 
just wanted to confirm this from the list.

Also, I want to know if I should put the same rules for OUTPUT? Shall I just 
copy the above rules and replace INPUT with OUTPUT in them?
Maciej had suggested this before,
iptables -P OUTPUT ACCEPT
iptables -A OUTPUT -s ! <your.real.ip> -j DROP
IS this enough for my present senario?

Also, do I set FORWARD to DROP?

I know that there must be a elegant way of doing this, but it is just a start 
for me. For now, I want to get the whole thing working properly. I am losing 
bandwidth due to some stupid programs from inside and outside.

Please tell me if I am making a mistake anywhere. I will be remotely login in 
the server to do this? I certainly don't want ssh to stop :) 

Thanks a lot in advance and eagerly waiting for the replies (especially about 
the OUTPUT part, of which I have some reservations which i will discuss 
later).

Bye.
-Payal


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

end of thread, other threads:[~2002-10-07  9:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-04 16:06 are these enough now? Clint Todish
2002-10-04 18:34 ` Mitesh P Choksi
     [not found] <200210041218.26636@.>
2002-10-04  9:47 ` Antony Stone
2002-10-04 11:25   ` PayalR
     [not found]   ` <200210041648.00792@.>
2002-10-04 13:09     ` Antony Stone
2002-10-04 15:22       ` PayalR
2002-10-04 15:59       ` Clint Todish
     [not found]       ` <200210042048.36993@.>
2002-10-04 19:13         ` Antony Stone
2002-10-04 20:32           ` Alistair Tonner
2002-10-07  9:53             ` Antony Stone
2002-10-05 11:39           ` PayalR
     [not found]           ` <200210051707.52456@.>
2002-10-05 13:05             ` Antony Stone
  -- strict thread matches above, loose matches on Subject: below --
2002-10-04  7:17 PayalR

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