0.8.1 [Busybox] Rare TCP port opened [SOLVED]

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

0.8.1 [Busybox] Rare TCP port opened [SOLVED]

Postby esmetaman » Sun May 04, 2014 12:13 pm

Hi,

I was scanning some TCP Ports in the EV3 brick and I have discovered that exist some ports which I think that they should be closed.

List of Port opened:

Port Open: 22 (SSH)
Port Open: 23 (Telnet)
Port Open: 1099 (RMI)
Port Open: 8001 (??)
Port Open: 57744 (??)


Why we have Telnet port opened?
What is the usage of port 8001 and 57744?

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
http://www.ietf.org/assignments/service-names-port-numbers/service-names-port-numbers.txt
Last edited by esmetaman on Sun May 04, 2014 9:21 pm, edited 1 time in total.
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 290
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby gloomyandy » Sun May 04, 2014 1:38 pm

Why not have the telnet port open? There is a telnet daemon on the EV3, not everyone wants to use ssh. Given that there is no password on the roor account of the EV3 it hardly matters if ssh or telnet is being used. As to the other ports, the Menu system talks to ntp servers to set the time, it also opens a udp port to announce to the local sub net that an EV3 is around. I think it may also open other ports to listen for remote control requests. What is your concern here? I assume you are not keeping all of your financial information on the EV3.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4042
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby esmetaman » Sun May 04, 2014 2:17 pm

Hi Andy,

With EV3, one the main feature is the usage of a Unix System to manage the brick so I think people will use Unix services little by little and it is normal to control what ports is opened and close those ports not used.

Besides, it is curious that now, I get another port:

Code: Select all
Port Open: 35292


I think that EV3 with LeJOS is a good opportunity to learn Java and Unix systems.

I didn't use Telnet for EV3 but it is nice:

Code: Select all
soulFactory:dist jabrena$ telnet 10.0.1.1
Trying 10.0.1.1...
Connected to 10.0.1.1.
Escape character is '^]'.

 _____       _     _ ___
|  _  |_ _ _| |___| | __|
|    _| | | . | . | | _|
|__|__|___|___|___|_|_|

Rudolf 2011.01 (none)

login: lejos
Password:
lejos@(none):~$ ls
programs


Anyway, if users use SSH, I suppose that Telnet it is not necessary.

I noticed that Busybox doesn't incorporate iptables, but I suppose that exist another command to block manually ports not used. I will research it.

Cheers
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 290
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby gloomyandy » Sun May 04, 2014 2:29 pm

It is not at all unusual to see different addresses in use these ports (like 35292) are simply select at random from a large unused port range when you don't care what the local port number is (which you typically don't when creating an outbound connection to a server, or when the system supplies the listening port number by some other means, like a UDP broadcast or other discovery system, rather than using a well known port number, which in theory should be registered).

Unless you are planning on attaching your EV3 directly to some sort of public network, I really would not bother with trying to secure the network ports, but that is up to you.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4042
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby esmetaman » Sun May 04, 2014 2:39 pm

Hi Andy,

I have some ideas in this sense:

Unless you are planning on attaching your EV3 directly to some sort of public network


Cheers
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 290
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby esmetaman » Sun May 04, 2014 3:12 pm

To stop Telnet service on a Busybox distro:

Code: Select all
root@(none):/usr/sbin# /usr/sbin/telnetd
root@(none):/usr/sbin# start-stop-daemon -K -n telnetd
stopped telnetd (pid 1738)
root@(none):/usr/sbin# start-stop-daemon -K -n telnetd
no telnetd found; none killed
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 290
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby esmetaman » Sun May 04, 2014 3:45 pm

Another way to show port opened:

Code: Select all
root@(none):/proc/1709/net# netstat -a | grep LISTEN
netstat: /proc/net/tcp6: No such file or directory
tcp        0      0 (null):8001             (null):*                LISTEN     
tcp        0      0 (null):rmiregistry      (null):*                LISTEN     
tcp        0      0 (null):ssh              (null):*                LISTEN     
tcp        0      0 (null):35292            (null):*                LISTEN


Note: I have opened a Stackoverflow question:
http://stackoverflow.com/questions/2346 ... -tcp-ports
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 290
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain

Re: 0.8.1 [Busybox] Rare TCP port opened

Postby esmetaman » Sun May 04, 2014 9:20 pm

Finally, I discovered a way to know what processes listen that ports:

Code: Select all
root@(none):~# netstat -a -p
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 (null):8001             (null):*                LISTEN      1527/java
tcp        0      0 (null):8002             (null):*                LISTEN      1527/java
tcp        0      0 (null):56618            (null):*                LISTEN      1527/java
tcp        0      0 (null):rmiregistry      (null):*                LISTEN      1527/java
tcp        0      0 (null):ssh              (null):*                LISTEN      1181/dropbear
tcp        0      0 (null):telnet           (null):*                LISTEN      1166/telnetd
tcp        0      0 (null):ssh              (null):55960            ESTABLISHED 1549/dropbear


Note: I have opened another question:
http://stackoverflow.com/questions/2346 ... to-port-22
Juan Antonio Breña Moral
http://www.juanantonio.info/lejos-ebook/
http://www.iloveneutrinos.com/
User avatar
esmetaman
Advanced Member
 
Posts: 290
Joined: Wed Sep 13, 2006 12:16 am
Location: Madrid, Spain


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff