Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Port 4001 held open by squid proxy

75 views
Skip to first unread message

Polly the Parrott

unread,
Dec 12, 2011, 1:49:37 PM12/12/11
to
Running Zenmap, shows

"4001/tcp open http-proxy Squid webproxy"

I need that port for another service.

Not using squid, so I did a complete removal in Synaptic and rebooted.

Zenmap still gave the same above results.

Question is, how can I close that port so that it is available to the other
service?

And as usual, thanks in advance!

Zebee Johnstone

unread,
Dec 12, 2011, 3:56:56 PM12/12/11
to
In aus.computers.linux on Tue, 13 Dec 2011 05:49:37 +1100
By finding out what *really* has it open!

(Yes, this crusty old unix admin does not trust gui tools...)


sudo lsof -i -P

what this does is give you the power of root (the sudo bit) to have
lsof (a very useful tool) list all the internet connections (the -i)
using port numbers (the -P)

(when sudo asks for a password it wants your password)

So have a look at that, looking for 4001 in the last column, the one
after TCP/UDP.
(you can use grep to make it easy, sudo lsof -o -P | grep 4001 )

eg, on my box what's using port 5900 is this:

x11vnc 2635 zebee 9u IPv4 16167 0t0 TCP *:5900 (LISTEN)

so that's the program x11vnc with the PID (process id) 2635

if I do a process listing:
[zebee@hp Default]$ ps -ef | grep 2635
zebee 2635 2445 0 Nov11 ? 00:39:19 /usr/bin/x11vnc -display :0


Now.. using grep strips the headers but I know that the first number
is the PID of x11vnc and the 2nd is its parent

[zebee@hp Default]$ ps -ef | grep 2445
zebee 2445 1 0 Nov11 ? 00:00:00 kdeinit4: kdeinit4 Running...

Right... so x11vnc is run by kdeinit, so it's in my startup items.

So use lsof -i -P to see what's using port 4001, then the process
listing and grep to see just what's going on.

Zebee

Polly the Parrott

unread,
Dec 13, 2011, 4:21:01 AM12/13/11
to
On Tue, 13 Dec 2011 07:56 someone claiming to be Zebee Johnstone
(zeb...@gmail.com), said:


> By finding out what *really* has it open!
>
> (Yes, this crusty old unix admin does not trust gui tools...)
>
>
> sudo lsof -i -P

Thanks, unfortunately error message:-

lsof: illegal option character:
lsof: illegal option character: �
lsof 4.81


Then further info about where the latest version can be found.

>

Zebee Johnstone

unread,
Dec 13, 2011, 6:00:17 AM12/13/11
to
In aus.computers.linux on Tue, 13 Dec 2011 20:21:01 +1100
Polly the Parrott <flatula...@deadspam.com> wrote:
> On Tue, 13 Dec 2011 07:56 someone claiming to be Zebee Johnstone
> (zeb...@gmail.com), said:
>
>
>> By finding out what *really* has it open!
>>
>> (Yes, this crusty old unix admin does not trust gui tools...)
>>
>>
>> sudo lsof -i -P
>
> Thanks, unfortunately error message:-
>
> lsof: illegal option character:
> lsof: illegal option character: �
> lsof 4.81


Hmm... did you cut and paste? Are you using windows to read this?
did your windows program "helpfully" replace those - with something
else? Did a stray finger get a control character in there somewhere?


if you type it straight, no cut and paste of any kind, does it work?

(mine's version 4.83 so I doubt yours doesn't understand -i and -P)

Zebee

Polly the Parrott

unread,
Dec 13, 2011, 6:13:08 AM12/13/11
to
On Tue, 13 Dec 2011 22:00 someone claiming to be Zebee Johnstone
(zeb...@gmail.com), said:


> if you type it straight, no cut and paste of any kind, does it work?

Silly me, cut & paste.

Following is output:=-

dhclient 1177 root 6u IPv4 8826 0t0 UDP *:68
mix 1305 anon-proxy 0u IPv4 11453 0t0 TCP localhost:4001
(LISTEN)
mix 1305 anon-proxy 1u IPv4 11612 0t0 TCP Satellite-
T110.local:52001->mix.inf.tu-dresden.de:443 (ESTABLISHED)

(Second bit may be irrelevant?)

So how to fix, and what is "anon=proxy"?




Jonathan N. Little

unread,
Dec 13, 2011, 11:08:48 AM12/13/11
to
Polly the Parrott wrote:
> On Tue, 13 Dec 2011 22:00 someone claiming to be Zebee Johnstone
> (zeb...@gmail.com), said:
>
>
>> if you type it straight, no cut and paste of any kind, does it work?
>
> Silly me, cut& paste.
>
> Following is output:=-
>
> dhclient 1177 root 6u IPv4 8826 0t0 UDP *:68
> mix 1305 anon-proxy 0u IPv4 11453 0t0 TCP localhost:4001
> (LISTEN)
> mix 1305 anon-proxy 1u IPv4 11612 0t0 TCP Satellite-
> T110.local:52001->mix.inf.tu-dresden.de:443 (ESTABLISHED)
>
> (Second bit may be irrelevant?)
>
> So how to fix, and what is "anon=proxy"?
>
>
>
>

It is *anon-proxy*

$ apt-cache search anon-proxy
anon-proxy - Proxy to surf the web anonymously

Fix it? Just uninstall it if you wish. You installed it, it is not
installed by default.

sudo apt-get purge anon-proxy


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Polly the Parrott

unread,
Dec 13, 2011, 12:05:14 PM12/13/11
to
On Wed, 14 Dec 2011 03:08 someone claiming to be Jonathan N. Little
(lws...@gmail.com), said:


> Polly the Parrott wrote:
>> On Tue, 13 Dec 2011 22:00 someone claiming to be Zebee Johnstone
>> (zeb...@gmail.com), said:
>>
>>
>>> if you type it straight, no cut and paste of any kind, does it work?
>>
>> Silly me, cut& paste.
>>
>> Following is output:=-
>>
>> dhclient 1177 root 6u IPv4 8826 0t0 UDP *:68
>> mix 1305 anon-proxy 0u IPv4 11453 0t0 TCP localhost:4001
>> (LISTEN)
>> mix 1305 anon-proxy 1u IPv4 11612 0t0 TCP Satellite-
>> T110.local:52001->mix.inf.tu-dresden.de:443 (ESTABLISHED)
>>
>> (Second bit may be irrelevant?)
>>
>> So how to fix, and what is "anon=proxy"?
>>
>>
>>
>>
>
> It is *anon-proxy*
>
> $ apt-cache search anon-proxy
> anon-proxy - Proxy to surf the web anonymously
>
> Fix it? Just uninstall it if you wish. You installed it, it is not
> installed by default.
>
> sudo apt-get purge anon-proxy

Thanks, just wondering where it was installed from - have an idea might be
buggy software which didn't close properly, but as you can see, technically
challenged!
>
>

Zebee Johnstone

unread,
Dec 13, 2011, 2:21:48 PM12/13/11
to
In aus.computers.linux on Tue, 13 Dec 2011 11:08:48 -0500
Jonathan N. Little <lws...@gmail.com> wrote:
> Polly the Parrott wrote:
>> Following is output:=-
>>
>> dhclient 1177 root 6u IPv4 8826 0t0 UDP *:68
>> mix 1305 anon-proxy 0u IPv4 11453 0t0 TCP localhost:4001
>> (LISTEN)
>> mix 1305 anon-proxy 1u IPv4 11612 0t0 TCP Satellite-
>> T110.local:52001->mix.inf.tu-dresden.de:443 (ESTABLISHED)
>>
>
> It is *anon-proxy*
>
> $ apt-cache search anon-proxy
> anon-proxy - Proxy to surf the web anonymously
>
> Fix it? Just uninstall it if you wish. You installed it, it is not
> installed by default.
>
> sudo apt-get purge anon-proxy

And this is why GUI tools are the devil's work....

Some silly bloody programmer thought "I only use squid, so any proxy
is squid" and your GUI tool flagged it as squid.

IF something is looking odd, do things the unix way: get onto the
command line and use the simple tools.


Zebee

Polly the Parrott

unread,
Dec 13, 2011, 8:14:02 PM12/13/11
to
On Wed, 14 Dec 2011 06:21 someone claiming to be Zebee Johnstone
(zeb...@gmail.com), said:


> And this is why GUI tools are the devil's work....

Thanks guys for all your help!

0 new messages