LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-16-2003, 11:48 PM   #1
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Rep: Reputation: 30
port 515


i tried closing down the only print service i have running and that is cups. I'm still getting

Port State Service
515/tcp open printer

why? i don't get it? what service is listening on this port? i never use to get this all of a sudden in the last couple of months this port has been opened up.

what command in linux is equal to ipconfig /all this is a necessity

thanks,
AD
 
Old 06-17-2003, 12:00 AM   #2
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 58
did you setup iptables to close that port and the equivilant i guess we will call to ipconfig is
/sbin/ifconfig eth0, that is if eth0 is the card you use to connect to the net...
 
Old 06-17-2003, 12:34 AM   #3
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
I'm using firestarter and i have been blocking that port, but thats besides the point. there is a service using that port and i want to close it down. funny thing though even after blocking the 515 port in firestarter its still showing up as a open port. I'm just trying to find the service that is using this port thats all. i finally had to go into my router and block it out. I'm just seeing allot of posts around about port 515 and i have not seen the source yet.


cool i like it /sbin/ifconfig eth0 I'm feeling better already

you wouldn't happen to know a command that will tell me my public ip address would you, I'm running nat (IP Masquerading).

thanks for the help DrOzz
 
Old 06-17-2003, 02:37 AM   #4
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
that's the lpr part of the lpd daemon that's using port 515. lpr is the network spooler. if you want to close that port, you'll need to disable lpd from you service configuration.
 
Old 06-17-2003, 11:18 PM   #5
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
i wish it was that easy because i might have seen it but its not listed in my service configuration i don't even have LPRng installed on my system. any other ideas i just cant believe i cant find a post where someone had already solved this problem. i see this question about port 515 everywhere not that any of the questions are asking specifically just about port 515 but open ports in general and port 515 is sure listed allot.

thanks for your help,
AD
 
Old 06-18-2003, 12:06 AM   #6
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
As root, run:
Code:
netstat -lnp
This will tell you what is listening on which ports. You can then:
Code:
ps auxww | grep $PID
where $PID is the pid of the process listening on your port 515.
You can also do:
Code:
lsof -i
which will tell you information about what is listening at the port.

Last edited by moses; 06-18-2003 at 12:08 AM.
 
Old 06-18-2003, 12:25 AM   #7
illtbagu
Member
 
Registered: Dec 2002
Location: Nevada
Distribution: fedora, RHEL, ubuntu, suse
Posts: 343

Original Poster
Rep: Reputation: 30
wow slackware since 1994 your hardcore man


my 515 port is not listed as listening as a active internet connection or socket when i do netstat -lnp

thanks,
AD
 
Old 06-18-2003, 12:50 AM   #8
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
You can also run
Code:
netstat -anpc
which will show everything (listening and non-listening) every second until you kill it, which can be useful to see if something opens up while you are doing a port scan. . .
(man netstat)
 
Old 06-18-2003, 02:09 AM   #9
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
hmmm... strange. do you have "lpd" running in your service configuration? i think if you have lpd installed, you'll get lpr. i just tested this and disabling lpd closes port 515 according to nmap.

if you need nmap: http://www.insecure.org/nmap/

Last edited by megaspaz; 06-18-2003 at 02:10 AM.
 
Old 06-18-2003, 02:38 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,644

Rep: Reputation: Disabled
Thanks for that link!
 
Old 06-18-2003, 02:53 AM   #11
techie415
LQ Newbie
 
Registered: Jun 2003
Posts: 4

Rep: Reputation: 0
If you want to disable port 515, go to file /etc/services and hash out both these lines
printer 515/Tcp spooler
printer 515/udp spooler

That will disable 515
 
Old 06-18-2003, 02:56 AM   #12
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Quote:
Originally posted by illtbagu
you wouldn't happen to know a command that will tell me my public ip address would you, I'm running nat (IP Masquerading).
I've never heard of one, but when I have to find mine, I have a page setup as a bookmark that shows it to me:
http://dynamic.zoneedit.com/checkip.html
(I don't masquerade AFAIK though, so I don't know if that'll work for you or not..)

HTH

Cool
 
Old 06-18-2003, 03:34 AM   #13
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
Is your router assigned an IP number via DHCP? Most decent routers allow you to connect to them via HTTP. Usually they show their current configuration, including their WAN and LAN IP addresses. . .
If you want a commandline way of getting this, check out wget.

Last edited by moses; 06-18-2003 at 03:41 AM.
 
Old 06-18-2003, 03:47 AM   #14
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
How would you do that with wget?
 
Old 06-18-2003, 04:21 AM   #15
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
If you know what the page that gives you that information is (say, /Status.htm on my Linksys router), you would do something like:
Code:
wget --http-user=username --http-passwd=pasword http://router.local.ip.address/Status.htm
Of course, this sends your router password as plain text and also saves it in your history file and shows up in "ps". Much of that can be mitigated (read the man page), and since most routers don't use SSL, it's not really any more dangerous than your current connection method. . .

Last edited by moses; 06-18-2003 at 04:22 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
lpd port 515 reopens itself debaholic Debian 2 11-26-2003 09:29 AM
Cannot bind to port 515 to print jitz Linux - General 1 11-17-2003 04:17 AM
Cannot bind lpd port 515 rdmapes Linux - Newbie 3 09-19-2003 05:49 AM
port 515, 6000 iptables magicmanstl Linux - Security 3 08-10-2003 07:04 PM
lpd can't bind to port 515 (RH 8) Tafta Linux - Distributions 4 02-28-2003 10:31 AM


All times are GMT -5. The time now is 04:53 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration