[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: port 16001 and 111



> Jean Christophe ANDRÉ <jean-christophe.andre@auf.org> wrote:
> > You said "what would try to connect to my system's port [...] 111
> > from within my own system". I would answer "something that is
> > configured to do so"?

Jussi Ekholm écrivait :
> Yup, but what?

I suggest you to make a little program listening that port and spying what
is trying to connect to it.

You may do something like that (needs apt-get install netcat) :

- create a little script /root/spy.sh (just use netstat) :
    #!/bin/sh
    (
      echo "====="
      date
      netstat -lnp
    ) >> /root/spy.txt
    # yes, I know, there is no lock managment, but hey! just for testing! :)
- lauch a netcat in a terminal (or screen) :
    nc -l -p 111    -e /root/spy.sh   # for TCP connection
    nc -l -p 111 -u -e /root/spy.sh   # for UDP connection
- open the 111 access :
    iptables -I INPUT -i lo -p tcp --dport 111 -j ACCEPT
    iptables -I INPUT -i lo -p udp --dport 111 -j ACCEPT
- then wait and check the /root/spy.txt :
    tail -f /root/spy.txt

There is some other (better) way of doing this (by programming),
but this one is the easier I can think by know... :)

Cheers, J.C.



Reply to: