May 5, 2025•7 min read••
Tags ▼
No tags
Using Samba on your Samsung NC110 running Ubuntu Server 24.04.1 is a lightweight and manageable solution that should not have a significant impact on your server, especially if it’s being used primarily for network storage and media sharing.
Here’s a detailed assessment of potential impact along with ways to optimize your server’s performance when using Samba.
Optimization Tip:
Optimization Tip:
This can be added tosocket options = SO_RCVBUF=65536 SO_SNDBUF=65536
/etc/samba/smb.conf.df -h
Optimization Tip:
Example config:sudo nano /etc/logrotate.d/samba
/var/log/samba/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
}
If your NC110 is also running other services (like Jellyfin or WireGuard), there might be resource competition since the Atom CPU and memory are limited.
Optimization Tips:
top
sudo nice -n 10 smbd
Using Samba to share files makes your home network accessible, so it’s important to secure the service to prevent unauthorized access.
Best Practices for Security:
Restrict access to Samba shares by IP address in /etc/samba/smb.conf:
hosts allow = 192.168.1.0/24
Use strong passwords for Samba users and require authentication:
sudo smbpasswd -a [your-username]
Firewall Configuration: Allow Samba through the firewall but limit it to internal networks:
sudo ufw allow from 192.168.1.0/24 to any port 137,138 proto udp sudo ufw allow from 192.168.1.0/24 to any port 139,445 proto tcp
To ensure Samba is not causing performance bottlenecks:
Use system monitoring tools:
htop iotop
These will show you CPU, memory, and disk I/O usage to spot any issues caused by Samba.
Check Samba logs for errors or performance issues:
sudo tail -f /var/log/samba/log.smbd
Given your Samsung NC110’s limited hardware, Samba should run fine for light file-sharing tasks. However:
In summary, Samba is a good fit for your NC110 server as long as:
Great! Since your Samsung NC110 server already has UFW (Uncomplicated Firewall) installed, let’s walk through the proper firewall configuration for Samba. This will ensure your server is secure while allowing only internal devices on your network to access your shared files.
For Samba to work, several network ports must be opened. Here’s a quick overview of the required ports:
You need to allow these ports in UFW, but only for trusted devices on your home network to ensure security.
Before configuring UFW, verify the IP address range of your home network. Typically, routers assign addresses in the range:
You can check your NC110’s IP and network with:
ip a
Look for your Ethernet or Wi-Fi interface to confirm the IP range (e.g., 192.168.1.x).
Use the following UFW commands to allow Samba traffic only for devices on your local network. Replace 192.168.1.0/24 with your actual network range if it differs.
# Allow Samba UDP traffic on ports 137 and 138 sudo ufw allow from 192.168.1.0/24 to any port 137,138 proto udp # Allow Samba TCP traffic on ports 139 and 445 sudo ufw allow from 192.168.1.0/24 to any port 139,445 proto tcp
After adding the rules, reload and enable UFW to apply the changes:
sudo ufw reload sudo ufw enable
Then, verify that the Samba rules are active:
sudo ufw status verbose
You should see entries like this:
To Action From
-- ------ ----
137,138/udp ALLOW 192.168.1.0/24
139,445/tcp ALLOW 192.168.1.0/24
To block external access, ensure UFW denies all incoming traffic by default, which is good practice.
Check your default policies:
sudo ufw status verbose
If the output shows:
Default: deny (incoming), allow (outgoing)
You're all set. If not, update it with:
sudo ufw default deny incoming sudo ufw default allow outgoing
Try accessing your Samba share from a Windows or macOS machine on the same network.
Windows:
Open File Explorer and enter:
\\[NC110-server-IP]\MyFiles
macOS:
In Finder, go to Go > Connect to Server and enter:
smb://[NC110-server-IP]/MyFiles
If successful, the shared folder will open. If not, review the UFW rules and ensure Samba services are running:
sudo systemctl status smbd nmbd
UFW not blocking external access properly? Double-check that no "Allow Anywhere" rules exist:
sudo ufw status | grep "Anywhere"
Need to remove a specific rule?
Use:
sudo ufw delete allow from 192.168.1.0/24 to any port 137,138 proto udp
Using UFW to control Samba access ensures that only trusted devices on your local network can connect to your shared folders. The security provided by UFW is crucial when running any service on a home server, especially Samba, as it could otherwise expose your files to the internet. With this setup:
Now you can safely enjoy Samba network storage on your $0 Home Server, knowing that your firewall is properly configured!
Follow on your preferred channel for new articles, notes, and experiments.