Professional Documents
Culture Documents
TR EB Linux Tips
TR EB Linux Tips
TechRepublic
Cover image:
9920 Corporate Campus Dr.
iStockphoto/ jacoblund
Suite 1000
Louisville, KY 40223
Online Customer Support:
http://techrepublic.custhelp.com/
Introduction
Networking is a must-have on all levels of computing. And with some help, the Linux operating system can be
the king of networking, in both ease of use and security. But that doesn’t mean the average (and sometimes
even the above-average) user can’t use some help.
Although Linux has made significant advances over the years, there are still instances where the standard
troubleshooting or optimizations won’t work. Having a few tricks up your sleeve can make your life easier. Here
are 20 tips I wanted to share with you. I hope they’ll help you in configuring, optimizing, and troubleshooting
you Linux network woes.
IP_ADDRESS NICKNAME
For example, if I use one machine for a backup location at IP address 192.168.1.101, I could enter:
192.168.1.101 backups
Now if I have to connect to that machine, say with secure shell, I can just type ssh -v -l username backups to
make the connection.
Let’s say you want to block the domain bad.domain.name from gaining access to a machine. To do this, open
up the /etc/hosts.deny file (you will need either root or sudo privileges) and add this to the bottom of the file:
ALL: bad.domain.name
Many of the Linux wireless tools have trouble when any encryption is involved. But the WICD tool takes care of
this. Now, connecting to WPA or WPA2 encrypted wireless networks is simple. Add to that the amazingly easy
GUI employed by WICD and you can check one nasty headache off your list.
nameserver IP_ADDRESS
where IP_ADDRESS is the actual address of your name server. You can have as many name servers listed as
you need.
7: Install ClamAV
If you run a mail server, an antivirus is essential. Even though you are running Linux and you know your mail
server is immune to 99.9999999% of the viruses in the wild, that doesn’t mean all those clients that download
mail from your server are immune. With this in mind, you will make your admin life far easier if you install an
antivirus like ClamAV onto your Linux mail server.
Of course, you will want to plug in your particular information as it applies to the above.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
As you can see above, all of my interfaces are set up for dhcp. This is my laptop, which goes with me every-
where, so dhcp is a necessity. But what if I use the wired interface in only one location?
For that, I can hard-code the information here under the eth0 interface like so (for Ubuntu):
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.104
gateway 192.168.1.1
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.10
NETMASK=255.255.255.0
NETWORK=192.168.1.104.0
ONBOOT=yes
Again, you would plug in all the information suited to your network and your device.
smbpasswd -a USERNAME
After you hit Enter, you will be asked for the user’s password (twice). NOTE: You must have root access (or
sudo) to pull this off.
to clean up that hosts file. If you do use /etc/hosts as a quick fix (or for testing purposes), be sure to remove
those entries as soon as you’re done. If you do have to retain a few entries in the hosts file, keep it to a
minimum.
About TechRepublic
TechRepublic is a digital publication and online community that empowers the people of business and
technology. It provides analysis, tips, best practices, and case studies aimed at helping leaders make better
decisions about technology.
Resources
Subscribe to our free newsletters: Stay on top of business technology trends, learn about innovative new
products, and hone your skills with our how-to’s and tutorials.
Check out the TechRepublic discussion forums: Touch base with your peers and share tips, advice,
solutions, and opinions.
Catch the latest videos and photo galleries: Our video library offers interviews with entrepreneurs, IT pros,
and CXOs; short clips on the latest tech news; and overviews of emerging technologies. Our galleries offer a
look at everything from the hottest mobile devices to autonomous cars to the gadgets, tools, and accessories
that are headed your way.