Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, October 30, 2018

Creating a Fedora 28 Server Linux Router - Part 1

Linux has some very powerful routing capabilities. It is also very performant and it uses very few resources. These, and countless other benefits make it an excellent choice for a router operating system. Choosing a distribution can be a challenge, however.

I have built routers using pfSense, DD-WRT, Ubuntu, Debian, and CentOS. Each of these has pros and cons. pfSense and DD-WRT have web applications that can be used to configure the router. Ubuntu and Debian are easy to get up and running quickly. CentOS has wide support. Fedora has much newer packages available, and also has wide support.

As a side note, Ubuntu is built on top of Debian. CentOS is built on top of Fedora. Debian and Fedora have been around for a very long time, and they have very large numbers of users.

After having created so many different routers, my current favorite is Fedora. It has been very predictable and stable - both are good qualities to have in a router operating system. This article will take you step-by-step through the process of building a router using Fedora.

Prerequisites


Here are my recommended prerequisites. I am just making these up based on past experiences:
  • 16 GB Hard Disk
  • 2 GB RAM
  • 2 CPU Cores
  • 2 Network Cards

Installation


Download and install Fedora Server from https://getfedora.org/en/server/. If you plan on booting from a USB drive, download the Fedora Media Writer from https://getfedora.org/en/workstation/download/. Note that although the page says Download Fedora 28 Workstation, the download link currently points to the Media Writer.


Post Installation Steps


Configure Static IP Address


Fedora 28 stores its network configuration scripts under /etc/sysconfig/network-scripts. For each network card that is detected, a script will be created with the prefix
ifcfg-. For example, my computer has two network cards: eth0 and eth1. eth0 is connected to the public Internet and eth1 is connected to my private network. Two files exist called ifcfg-eth0 and ifcfg-eth1.

To configure an IP address for a given interface, open the appropriate file in a text editor. By default, it is set to use DHCP to obtain an IP address. Add the following entries:

IPADDR=192.168.1.1
PREFIX=24


Install Updates


To install all available updates, type dnf upgrade at the console.






Tuesday, October 11, 2011

Linux Links

Start KVM at startup: http://www.cyberciti.biz/faq/rhel-centos-linux-kvm-virtualization-start-virtual-machine-guest/

Friday, October 30, 2009

Ubuntu Gateway Server - Installing Windows

The installation for Windows Server 2003 w/ SP2 went very smoothly. VMWare comes with a handy auto-installer that did all the work for me. After booting from the CD-ROM, I gave VMWare my key along with some default settings, and it did all the work. I went to work after starting the setup. When I returned, I had a Windows Server to play with. My next task was to install ISA Server 2006. This is where I ran into some hiccups.

In the real-world scenario, I will be setting up ISA Server using Remote Desktop onto a remote server. Wanting to simulate this scenario to see possible issues, I went ahead and did a Remote Desktop session into my server. I mounted the ISA Server 2006 .iso and began the installation. Everything here went smoothly. I then decided to install ISA Server 2006 SP1, and this is where I ran into issues.

After downloading and installing ISA Server 2006 SP1, I rebooted the computer (Do keep in mind that I am doing all this through a Remote Desktop session.). Then, when it came back up, I configured my server. Finally, I ran Windows Update and rebooted again. This time, however, I could not reconnect to my server via Remote Desktop. Further inspection into the Event Viewer revealed the the ISA Server firewall service had crashed!

Further research indicated that there was indeed an issue with ISA Server 2006 SP1. For more information, see the Microsoft Knowledge Base articles 956269 and 970443. This was a serious issue, because any crashes would permanently lock me out of the real machine I would be using (Which is a rented server that is being housed in a data-center far far away!). So, I uninstalled ISA Server from the VMWare console and decided to try again. This time I was successful. I came up with the following installation steps:

1. When installing ISA Server 2006 with Remote Desktop, you must be using Remote Desktop from a computer that has a static IP address. By default, ISA Server locks down everything. The exception is that, if it detects a Remote Desktop session, it will add the client computer's IP address to the 'Remote Management Computers' group. This will allow you to continue to be able to access the server remotely in spite of the firewall locking down everything.

2. After installing the software, reboot the computer once.

3. Immediately after reboot, install ISA Server 2006 SP1, but DO NOT REBOOT!

4. Immediately after installing SP1, install the two hotfixes mentioned previously. Do NOT REBOOT until the second hotfix is installed. Once you have installed BOTH hotfixes, then it is safe to reboot. Your computer should safely come back online, allowing you to further configure the box.

5. At this point, you may want to allow remote access to the server from other computers. You can do this by:
  1. Right-click the 'Firewall' option in the ISA Server Management Console
  2. Select 'Edit System Policy'
  3. Under 'Terminal Server,' choose the 'From' tab
  4. Edit the 'Remote Management Computers' group
  5. Add a new subnet: 0.0.0.0/0 and call it 'All Computers'

Ubuntu Gateway Server - Introduction

During the next several weeks, I am going to be configuring Ubuntu Linux Server as an Internet Gateway and Router. The server will perform several key tasks:
  1. NAT Internet traffic from my internal network to the Internet
  2. Function as a DNS server for my internal network
  3. Function as a DHCP server for my internal network
  4. Establish and maintain a slightly complex IPSEC VPN scenario
Throughout these articles, I will be setting up a fake test scenario inside VMWare. I will be setting up three VMWare machines. Two of them will be Ubuntu Linux Server and one of them will be Windows Server 2003 w/ SP2 running ISA Server 2006 w/ SP1.

During this simulation, each VMWare computer will be assigned two network adapters: one for the computer's "internal" network and one for its "external" network. In all reality, the external network will be my true private network. The following IP settings will comprise my simulation network:

Ubuntu Server 1:
  • Public IP address: 192.168.27.20
  • Public Netmask: 255.255.255.0
  • Internal IP address: 192.168.50.1
  • Internal Netmask: 255.255.255.0
Ubuntu Server 2:
  • Public IP address: 192.168.27.21
  • Public Netmask: 255.255.255.0
  • Internal IP address: 192.168.51.1
  • Internal Netmask: 255.255.255.0
Windows 2003 Server:
  • Public IP address: 192.168.27.22
  • Public Netmask: 255.255.255.0
  • Internal IP address: 192.168.51.1
  • Internal Netmask: 255.255.255.0