Question about LAN Visibility - Ubuntu 18.04 LTS (How I can hidden my computer in LAN) ?

Asked by Piotr on 2021-03-25

Dear Community,

I would like to ask you about LAN visibility. I want to know how I can hidden my computer in LAN if I will connected to public network? I know that someone can try attack me but I must know what is the basic setting to do this. In Windows family system is a simply GUI information yes/no for visibility in the LAN for other computers. I can see also public or private settings. This is in the Windows but what settings how can use for Ubuntu to protect myself and hidden my computer in public network? Can you help me?

Yours faithfully,

Question information

English Edit question
Ubuntu Edit question
No assignee Edit question
Last query:
Last reply:
neopran (neopran) said : #1

Hi Piotr,
In Windows the settings you are talking about, would enable/disable Windows discovery for things like shared folder/drives and media in general. This is to make it simple for users to share files across a LAN. Windows also has hidden file shares by default even if no shares are explicitly created. Usually accessible on \\computername\c$ and so on.

Ubuntu on the other hand has very few services which are running and exposing service by default. Such file sharing or discovery will not be enabled by default.

The best way to see what services are running AND listening on any ports you can use the netstat utility in the terminal. My suggestion being:

netstat -tulpn

This will show you which process/service is listening and the port it is also listening on. My suggestion is to limit the number of open ports and services listening on your LAN interface. Other than that there's not much more you can do, as by having an IP address on the network will mean that with a port/IP scanner, your computer will be found. Having said that, make sure to have a complex password for your user and also look at disabling root logins over SSH if you chose to have SSH enabled. You could also look at using the built in firewall "ufw" which would work in a similar fashion to Windows "public/private", however if you already have nothing/almost nothing listening then it will not do much for you. Hope this helps.

Piotr (peterq94) said : #2

@neopran, thanks you very much for answer. I don't have netstat program. I tried to found this but apt show nestat can't find this package. Can you tell me what default program on Ubuntu can similar things like netstat?

Manfred Hampl (m-hampl) said : #3

The command netstat (not nestat) is in package net-tools.

neopran (neopran) said : #4

As Manfred suggested you will need to install the package net-tools to gain access to the netstat command.

sudo apt install net-tools

Also I just want to add 1 more thing, I suggest running netstat using sudo so that you can also see the process id/name of each program listening.
For example:

sudo netstat -tulpn

Piotr (peterq94) said : #5

Okay, I think that this is probably good program but why Ubuntu don't have these kind of programs installed by default? About this netstat program I heard on other distro and Fedora or openSUSE probably have this installed by default. Maybe Ubuntu have another program with this same functionality? Do you know what name is of this program?

Can you help with this problem?

Provide an answer of your own, or ask Piotr for more information if necessary.

To post a message you must log in.