Turn File Sharing off on Network

I’m new to Lubuntu and Linux altogether. I am not allowed to use personal laptop on office internet but I am using anyway. I would like to know if the network manager, sitting within the office, can see files in my pc.

In short, I’d like to know how to turn file sharing on network on and off.

I’d just firewall the ports, but none of them are open to begin with. File sharing in Linux is pretty much the same as Windows (uses the same ports/protocols) and is called SAMBA. If it were installed, you would see a version under “Installed” if you ran apt-cache policy samba. Similarly, you’d find all the ports open with the following commands:

nc -v localhost {139,445}
nc -vu localhost 13{7,8}

If you want to go all out, you might go through the list of well known ports and firewall everything related to Windows, Microsoft, MS, etc. Don’t forget NetBIOS.

Given you’re new, I’m sure firewalling isn’t necessarily an easy concept. iptables is not necessarily for the weak and a graphical tool may be a bit better. There’s documentation (admittedly a bit outdated) that suggests ufw which is a heck of a lot easier than iptables, but still a command line program. I’ve never used it, but you might want to check into fwbuilder which, unlike gufw (which is also weird as it’s a frontend to a frontend), uses the Qt toolkit for graphics so it won’t require a bunch of extra dependencies in Lubuntu > 18.04.

Whatever program you decide (unless it’s iptables or ufw which are installed by default), you’ll need to install it. Use Muon (or if you’re on 18.04, Synaptic) since Discover doesn’t necessarily list everything. Alternately, you can sudo apt install <package> e.g. sudo apt install fwbuilder.


Now while that answers your immediate question, I’m not sure it will keep the network manager from knowing you’ve got another device connected. Assuming they have total control over the network, they has access to your IP address (and if they’re keeping track of all of them, they’ll see an extra one), MAC address (your network card’s device ID basically, though you can spoof this), and all the packets going back and forth across the network, which can easily be inspected. The last one is the most problematic. You could use something like a VPN (easier to screw up unless you have a very reliable VPN service and know what you’re doing) or Tor to anonymize your traffic, but even in the latter case, they would still know you were using Tor, which would be extremely suspicious. Worse yet, if this is their machine, they can do whatever they want with it including using various forms of tracking. tl;dr you’re probably going to get busted.

2 Likes

i dont know these metters as much as you but i still will try to suggest somethings. Using mobile harddisk or flash disk to open linux and using mobilephone’s internet, so they cant track him cuz they wont have any connection or cant track his files. if he is not allowed to disconnect from line or cant shutdown pc’s main os, i have another idea which is using his pc which is at home via an app like Anydesk. Im writings these to you as a reply cuz i want you to check these before he try.

Regarding the disk, that doesn’t matter too much. It’s connecting to a shared network that’s the problem. So if you use your mobile network, that will be best. You might want to go the extra mile and turn off unnecessary radios (wifi, bluetooth) so they can’t pick you up that way, either. I wouldn’t try using remote connections because those involve the shared network and could be intercepted as aforementioned.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.