Home Linux How to Install ‘IPFire’ Free Firewall Linux Distribution

How to Install ‘IPFire’ Free Firewall Linux Distribution

0
How to Install ‘IPFire’ Free Firewall Linux Distribution


IPFire is an open-source Linux distribution that works as a firewall, VPN gateway, proxy server, DHCP server, time server, caching name server, Wake-on-LAN, DDNS, OpenVPN, monitoring tool, etc.

IPFire is released under a GPL license and is designed to be used for free. The developers prioritized security when building IPFire. Since IPFire connects directly to the internet, there is a risk of hackers and threats attacking it.

To avoid those threats and attacks, the Pakfire package manager helps administrators keep the package database up-to-date in IPFire.

IPFire was built using a super kernel with various threat detection, attack prevention, and compromise features and has a rich graphical interface. IPFire has the feature to use Samba and vsftpd file services. IPFire supports VDSL, ADSL, SDSL, Ethernet, and 4G/3G types of dial-ups.

We can use IPFire in any kind of virtual environment such as KVM, VMware, XEN, Qemu, Microsoft Hyper-v, Oracle VirtualBox, Proxmox, etc., and can be run in ARM Processor build machines such as Raspberry Pi.

During IPFire installation, the network is configured into various segments. This segmented security scheme indicates that there is a suitable place for each system in the network and it can be enabled separately as per our requirements.

Each segment acts as a group of machines that share a common security level, which is described in four different colors of zones i.e. Green, Red, Blue, and Orange.

  • Green – This represents that we are in a safe area. Clients in the Green area will be without any restrictions and connected internally/locally.
  • Red – This indicates that we are in danger or disconnected from the outside world; nothing will be allowed through the firewall unless specifically configured by the admins.
  • Blue – This represents the ‘wireless‘ network, which is used for the local area network.
  • Orange – This refers to the ‘DMZ‘ (demilitarized zone). Any servers that are accessible publicly are separated from the rest of the network to minimize security breaches.

IPFire recently released its 2.29 core update 186 version, which comes with a new graphical user interface that was completely re-designed and comes with massive new functionality.

IPFire Hardware Requirements

  • Processor x86_64 or ARM64 CPU with 1 GHz or better or a supported ARM SBC.
  • Memory 1GB or greater.
  • Storage at least 4GB of disk storage.
  • Network at least two Ethernet network adapters, which is essential for IPFire to function properly as a firewall and router.
  • A USB stick (at least 1GB in size) or a CD/DVD burner to create a bootable installation media.
  • Basic knowledge of networking and Linux.

My Environment Setup

Host name		:	ipfire.tecmint.com
IP address		:	192.168.1.1
Hard disk size		:	4 GB
Ethernet Cards	        :	2 No's

This article covers the installation of IPFire with the things that you will need to configure during installation. The installation and configuration procedure will not take more than 10 to 15 minutes depending on the speed of your computer.

Step 1: Create Bootable Media

1. To create bootable IPFire media, visit the official IPFire Download page and grab the IPFire ISO image as per your system architecture that matches your hardware (typically x86_64 for modern PCs).

2. Next, insert your USB stick into your computer and create a bootable image using the USB creation tool or use a tool like the dd command as shown.

sudo dd if=ipfire-2.29-core186-x86_64.iso of=/dev/sdX bs=4M status=progress && sync

Replace ipfire-2.29-core186-x86_64.iso with the actual version of your downloaded ISO file and /dev/sdX with your USB device (ensure you select the correct device to avoid data loss).

Step 2: Install IPFire Linux Distribution

3. Now that you have created a bootable USB drive, you need to boot from it by selecting the system’s boot options (usually by pressing F2, F12, or the Del key) and select the USB Drive as the boot device.

Once you have booted from the USB drive, you can start the installation process by choosing the “Install IPFire” option.

Install IPFire
Install IPFire

4. Next, choose the Language as respective to your region.

Select IPFire Language
Select Language

5. At this step, you can see that, if you do not wish to continue the setup you can Cancel the setup and reboot the machine.

Start IPFire Installation
Start IPFire Installation

6. Accept the license by pressing the Space bar to choose, and press OK to continue.

Select IPFire License
Select IPFire License

7. In the next step, the system will format your disk to install the IPFire system. Please note that all data on the disk will be erased.

Disk Setup Warning
Disk Setup Warning

8. Next, choose the file system as EXT4 and continue to the future steps.

Choose IPFire Filesystem
Choose IPFire Filesystem

9. Once, you select the filesystem type, the installation begins and disk will be formatted and system files will be installed.

Installing IPFire System
Installing IPFire System

10. Once installation completes, press OK to reboot to finalize the installation and continue with the further installation to configure ISDN, network cards, and system passwords.

IPFire Installation Finished
IPFire Installation Finished

11. After the system reboot, it will prompt you IPFire boot menu option, select the default option by pressing the enter key.

IPFire Boot Menu
IPFire Boot Menu

12. Next, select the type of Keyboard mapping Language from the drop-down list as shown below.

IPFire Keyboard Mapping
IPFire Keyboard Mapping

13. Next, choose the timezone from the list, Here I’ve chosen “India” as my timezone region.

IPFire Timezone
IPFire Timezone

14. Choose a hostname for our IPFirewall machine. By default, it will be ipfire. I’m not going to make any changes in these steps.

Set IPFire Hostname
Set IPFire Hostname

15. Give a valid domain name, if you have a local DNS server or we can define it later. Here, I am using “tecmint.com” as my local DNS server domain name.

IPFire Domain Name
IPFire Domain Name

16. Enter a password for the root user, This will be used for command-line access. I have used redhat123$ as my password.

IPFire Root Password
IPFire Root Password

17. Now here we need to provide a password for the admin user for the IPFire GUI web interface. The password must be different from the command line access credentials for security reasons.

IPFire Admin Password
IPFire Admin Password

Step 3: IPFire Network Configuration Settings

18. Here, we are using 2 Ethernet cards in our system. Each Ethernet card needs to be assigned separately for each network, by default it will choose GREEN + RED which means It connects to the local area network and WAN connection with Internet access.

IPFire Network Configuration
IPFire Network Configuration

19. Next, select GREEN + RED color for our two network cards and choose OK to continue.

Choose IPFire Network Type
Choose IPFire Network Type

Now we can see the current config as GREEN + RED it’s with local, WAN.

Step 4: IPFire Drivers and Card Assignments

20. From here, choose Drivers and card assignments type to choose the Network, which is going to be assigned for LAN and WAN interfaces.

IPFire Drivers and Cards
IPFire Drivers and Cards

21. Next, choose GREEN and press Select to enable an Interface for all two network cards.

IPFire Network Interfaces
IPFire Network Interfaces
Enable Network Interface
Enable Network Interface

22. Repeat the same above steps for RED interfaces and at the final step, we can see below.

Assign Red Network Interface
Assign Red Network Interface

Step 5: Assign IP Addresses for Network Interfaces

23. Now time to assign an IP address for each interface. Here we have only 2 interfaces and we need to assign IP addresses in different sub-nets.

If we use 192.168.0.100 for the RED interface, we must use different IP and network for other interface. For the RED interface we going to use DHCP.

Select Address Settings
Select Address Settings
  • GREEN interface – 192.168.1.1
  • RED interface – DHCP

24. Choose GREEN and provide the IP, While choosing we will get a Warning that our Local area connection will be dropped if we change the IP.

Select Green Interface
Select Green Interface
IP Change Warning
IP Change Warning

25. Next, provide the IP 192.168.1.1 for the GREEN network interface for our Local/Internal network.

Set IP Address For Green
Set IP Address For Green

26. Choose RED interface and choose DHCP to get an IP from our ISP are we can assign a manual IP. This is our WAN interface which is exposed to the Internet.

Set DHCP IP Address
Set DHCP IP Address

27. Here we need to configure whether our internet connection is with a Static IP or PPPOE or DIALUP method. I’m using DHCP for the WAN interface. Choose OK and save it by choosing DONE.

Configure Internet Connection
Configure Internet Connection

Step 6: DHCP Server Configuration

28. We need to configure DHCP settings for our GREEN interface for the LOCAL/INTERNAL interface. To get IP for client machines from DHCP.

DHCP pool range will be from 192.168.1.2 to 192.168.1.100

Configure DHCP Settings
Configure DHCP Settings

29. We have almost completed our setup, Choose OK to complete the IPFire setup.

IPFire Setup Completed
IPFire Setup Completed

Step 7: Post Installation Setup

30. After reboot, we will get the command line access using the root credentials that we provided during setup.

IPFire Commandline Access
IPFire Commandline Access

31. To access the web interface use the below URL, Which we used for the GREEN interface local/internal will be used for the WEB interface. Enter the username as “admin” and the password that we’ve set at #step 16 above.

https://192.168.1.1:444/
IPFire Web Access
IPFire Web Access

32. Once you log in, you will get the Dashboard of the web Interface in IPFire.

IPFire Dashboard
IPFire Dashboard

There are many features included in IPFire they are as follows, Web Proxy with squid, URL filter, Update accelerator, DHCP server, Connection scheduler, DNS Server, DNS forwarding, Static Routes, Wake-ON-LAN, Open VPN, Dynamic DNS (DDNS), Time server, Bandwidth monitoring, Memory usage, Log collector for every services, Syslog, Firewall rules, P2P networks, iptables, Backup options and restore for configurations, Shutdown etc..

Following are the screenshots of IPFire features.

Advanced Web Proxy
Advanced Web Proxy
URL Filter Configuration
URL Filter Configuration
DHCP Configuration
DHCP Configuration
Iptables Connection Tracking
Iptables Connection Tracking
Conclusion

We have seen how to protect our office or home network with IPFire firewall/Router, IPFire was a German-based Linux distribution only focused on security.

Hope you have found this article simple and easy to install and configure the firewall for your office or home environment. Don’t forget to fire your comments below after working around with IPFire.



Source link

netbalaban news