Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
06-05-2003, 01:24 AM
|
#1
|
Member
Registered: May 2003
Posts: 168
Rep:
|
port scan
Hi
i have been looking at the security of my linux red hat 8 server.
When i use languard to do a port scan from the internet it comes up i have ports 161 snmp and rip 520 open.
How can i block these from being seen from the internet and what are the implications if i try to disable these altogether?
thanks
|
|
|
06-05-2003, 08:07 PM
|
#2
|
Member
Registered: Dec 2002
Location: Omaha, NE
Distribution: Ubuntu Server and SuSE
Posts: 69
Rep:
|
The setup is pretty easy. Reference the thread started by Smooth called "Firewall Setup".
As far as the implications of port 161 and 520. Try doing a:
lsof | grep ESTABLISH and a
lsof | grep LISTEN
You can also replace the lsof with a "netstat -a"
This should give you some idea of what is using those two ports.
|
|
|
06-05-2003, 10:51 PM
|
#3
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
i edited my services file and commented these two services out for the time being. Is this OK to do?
thanks
|
|
|
06-05-2003, 10:52 PM
|
#4
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
161 is snmp and 520 is rip
|
|
|
06-06-2003, 05:19 AM
|
#5
|
Moderator
Registered: May 2001
Posts: 29,415
|
i edited my services file and commented these two services out for the time being. Is this OK to do?
No, it isn't. The services file is just a mapping and should be left untouched unless you add service/port mappings.
If these services are run, make sure you need then, and they correspond with the daemon that is sposed to run that service.
If you don't need to run these services, make sure they don't get started in /etc/rc.d/rc(runlevel).d if standalone, or in Xinetd. Uninstalling them would be the best solution. If you need to run these services, but only accessable to some IP addresses or ranges, place the right restricitions in their own configs (and check your SNMP community strings setup), and Xinetd (where applicable), and the firewall, and TCP Wrappers. If you do, you'll be reasonably safe as there isn't a single point of failure then.
|
|
|
06-06-2003, 05:57 AM
|
#6
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
how do i uninstall these services?
thanks again
|
|
|
06-06-2003, 06:09 AM
|
#7
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
why would i need snmp and rip?
|
|
|
06-06-2003, 12:56 PM
|
#8
|
Member
Registered: May 2003
Location: VietNam
Distribution: RedHat 9.0
Posts: 79
Rep:
|
Have u blocked them by Iptables?
iptables -A INPUT -i ppp+ -p TCP --dport 0:1023 -j DROP
iptables -A INPUT -i ppp+ -p UDP --dport 0:1023 -j DROP
|
|
|
06-06-2003, 06:26 PM
|
#9
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
is this all i need to do to block snmp and rip? How come they use the same dport?
yes, it looks like i have blocked them when i look at my iptables by typing iptables -L. I just did not know what i was looking at.
thanks
|
|
|
06-07-2003, 06:49 AM
|
#10
|
Moderator
Registered: May 2001
Posts: 29,415
|
how do i uninstall these services?
rpm -e <package name>.
|
|
|
06-07-2003, 02:34 PM
|
#11
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
thanks again, but how do i find out the package name?
|
|
|
06-07-2003, 05:39 PM
|
#12
|
Member
Registered: Dec 2002
Location: Omaha, NE
Distribution: Ubuntu Server and SuSE
Posts: 69
Rep:
|
I would recommend simply disabling them at first. If that works without a hitch, then you can consider removing them.
All you have to do to stop them and have them not startup again is go to Server Setting ==> Services
Here you can stop, start, and determine if you want the service to startup at boot. Normally, you'll start with RunLevel 5 displayed. You would also want to disable these services in the lower levels.
To actually answer your question though...
rpm -qa | grep snmp ==> will show all of the RPMs that have snmp in them.
rpm -qa net-snmp.......... ==> will give details on that package
rpm -e net-snmp ==> will delete the package
man rpm ==> will give all this info and more
Sometimes, you'll try "rpm -e" and it will give an error indicating that other packages are dependent on the one you are trying to delete. At this point, with the help of "rpm -qi", you have to decide if you wish to decide the packages that are dependent too.
IF you do, you can list the original package you want to delete as well as the package that is dependent on it when you do the "rpm -e" a second time.
e.g. rpm -e net-snmp 2nd_Package
However, I'd still recommend holding off until you've run the system a while without using these packages.
|
|
|
06-07-2003, 05:41 PM
|
#13
|
Member
Registered: Dec 2002
Location: Omaha, NE
Distribution: Ubuntu Server and SuSE
Posts: 69
Rep:
|
Oops,
change that goofy sentence to:
At this point, with the help of "rpm -qi", you have to decide if you wish to remove the packages that are dependent too.
|
|
|
06-08-2003, 01:18 AM
|
#14
|
LQ Guru
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280
Rep:
|
you must have installed some routing stuff that you didnt need. rip is a routing
protocol (Routing Information Protcol) and snmp = Simple Network Management Protocol.....you probably dont need a RIP router...it is used
for advertising routes that you know about and recieving routes from other
routers (it updates the routing table). You probably really dont need this. You
did a "install everything" huh?
|
|
|
06-08-2003, 06:28 AM
|
#15
|
Member
Registered: May 2003
Posts: 168
Original Poster
Rep:
|
yes, robert0380, i did install everything and now i am regretting it!!
Thanks pjcp64, i will try this tomorrow and let you know how i go.
These groups have been a great help to me. I really appreciate everyones help!!
|
|
|
All times are GMT -5. The time now is 08:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|