Back to Posts

Linux Networking 101

Posted in Linux & Sysadmin

Networks Engineered to Exploit.
- Windows/UNIX - Domains/Subnets - Initial/Post/Lateral - Low Cost VPN Ranges -

Linux Basic Networking

This is a quick guide and/or reference to Linux Basic Networking. I’ll be adding more as time goes on. Most examples will be targetd towards Debain flavors.

Before changing network configurations it’s beneficial to have physical access to the machines. If you’re using ssh and restarting the networking service with an error, how will you access the machine to fix it?


By default more Linux distros are not including ifconfig or netstat since they are considered to be depreciated. It would be best practice to learn alternative tools, but if you wish to install, run:

apt-get install net-tools

Up & Down

Quickly bring a network interface up or down

ifdown eth1
ifup eth1

Set Static IP

Set Static IP of host on Debian in /etc/network/interfaces. This will set the ip to with the router or gateway to - using auto eth0 will bring the interface up on startup.

auto eth0
iface eth0 inet static

Once any changes are saved to /etc/network/interfaces, the networking service will need ot be restarted. If you’re on a Desktop enviroment try the Network-Manager. A few commands to note:

systemctl restart networking
systemctl restart network-manager
systemctl reboot

Adding Routes

If you’ve created a new VLAN or Bridge, you may want to access it from other hosts on different networks.

For example, your WAN/Home/NAT’ed network is on You have a lab network on with a virtual pfSense instance routing the traffic at AND You want your RDP or attacking machine on your WAN/Home/NAT’ed network to access the lab network of

You’ll simple add the route to your attacking machine, pointing it to the router/gateway.

route add -net gw


Linux DNS configs can be located in /etc/resolv.conf. To add google DNS to your machine, simply add the below line and save.


Custom Cyber Ranges >>

Read Next

Wakanda CTF