Linux mint as router

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Linux Newbie Needs Help With Networking

Post by Vyper69 » Fri Dec 31, 2021 12:39 pm

I am new to any version of Linux. I chose Mint basically for its simplicity, and the fact it has a GUI. I understand windows networking and can make what I want to do there work, but I am trying to set up mint as my frontend.

The basic setup is as follows. Mint Box, Router, Rest of network. My Linux box will contain the following elements, which I get the basic jist of setting up. Firewall, Anti-virus, and Network Monitor. My problem isn’t this. My issue lies in actually setting up the network.

Card 1 or Internet In, is set to DHCP. Card 2 or Internet out, is set to shared. When I connect my router to Card 2, I don’t have any internet on my network, except on the Linux box. If I follow what I know about Windows, my error lies in the fact that Card 1 and my router are both set up as DHCP.

I know Card 1 should be set to DHCP, since my provider does not allow Static IP’s for Home Services.

Should card 2 be set as shared, then my router set to a static IP, or should card 2 be set to a static IP, and the router set to DHCP.

I would think that Card 2 should have a fixed IP, then connecting my router as is with DHCP enabled would allow my network to operate properly. Am I wrong with this thinking, and if I am, How is the proper way to set up my network so everything functions properly.

Any help would be great. Thanks

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

openletter Level 2
Posts: 70 Joined: Sat Aug 26, 2017 11:09 am Location: USA

Re: Linux Newbie Needs Help With Networking

Post by openletter » Sat Jan 01, 2022 1:51 pm

At least for me, I’m having a hard time understanding your desired network configuration.

Can you create some sort of topology diagram? Even if just text.

Re: Linux Newbie Needs Help With Networking

Post by Vyper69 » Sun Jan 02, 2022 1:50 pm

Here are the Basics of what I am looking to accomplish. General Idea of Network Map.

Linux Box/Router > Netgear 6350 Router > Rest of Network (Windows PC’s, Phones/Tablets, Roku Devices)

The goal is to have the Linux box be the front-end router and run Firewall, Anti-Virus/Malware software, and be my network monitor.

My problem is I am not sure about how to set the network up as far as IP’s.

Читайте также:  Asus pce n15 linux

Since the Linux box will be running DHCP, I know the Netgear router can not also run DHCP.

I know that Network card 1 will be as follows.

1. External IP
2. Subnet Mask
3. Gateway
4. DNS 1
5. DNS 2

Now here is where I am not sure. How do I configure Network card 2, and after that how do I configure the Netgear router?

I would assume, that I let the Linux box assign Network card 2 an Internal IP, then I would set the router to a static IP using Network card 2 as the gateway, once doing this, then I would Manually assign each device its own IP.

So here is what I was thinking.

Network Card 1

1. External IP
2. Subnet Mask
3. Gateway
4. DNS 1
5. DNS 2

Network Card 2

1 Internal IP
2. Subnet Mask — 255.255.255.0
3. Gateway (example 10.42.0.1)
1. DNS 1
5. DNS 2

Netgear Router

1. Static IP (example 10.42.0.2)
2. Subnet Mask — 255.255.255.0
3. Gateway (example 10.42.0.1)
4. DNS 1 (example 10.42.0.1)

The rest of the Network would be manually assigned IPs based on the Netgear Router Settings starting with an Ip of 10.42.0.? to 10.42.0.?

Am I correct in the assumption? If not where did I go wrong, and how do I fix it?

Re: Linux Newbie Needs Help With Networking

Post by axrusar » Mon Jan 03, 2022 10:08 am

Vyper69 wrote: ⤴ Sun Jan 02, 2022 1:50 pm

The goal is to have the Linux box be the front-end router and run Firewall, Anti-Virus/Malware software, and be my network monitor.

Hi Vyper69, welcome and happy new year.
Based on your goal, and considering you have that Netgear router, my suggestion would be you look in openwrt/start instead of trying to setup a linux Mint box for all your networking.
I am a Mikrotik guy, but in your case you may find easier to setup some app services with openwrt, and is Linux.
The Antivirus on the router idea does not sound doable with your current hardware and really unnecessary. Just use an antivirus on your windows boxes ( antivirus are useless and a big lie anyways ), or upgrade those boxes with Linux Mint and forget the need of any antivirus.
Good luck

Linux Mint Una Cinnamon 20.3 Kernel: 5.15.x | Quad Core I7 4.2Ghz | 24GB Ram | 1TB NVMe | Intel Graphics

openletter Level 2
Posts: 70 Joined: Sat Aug 26, 2017 11:09 am Location: USA

Re: Linux Newbie Needs Help With Networking

Post by openletter » Mon Jan 03, 2022 10:29 am

Vyper69 wrote: ⤴ Fri Dec 31, 2021 12:39 pm I am new to any version of Linux. I chose Mint basically for its simplicity, and the fact it has a GUI.

What I think you are looking for, a GUI, is not exactly what you are referring to in Mint. What Mint has is a desktop environment, whereas a GUI does not require a desktop environment. Also, because Mint is designed for desktop use, converting it into a network gateway is going to be more work than using a tool designed to be a network gateway.

Further, desktop environments generally introduce a significant amount of complexity, especially for a networking device.

I have been using OpenWrt for a couple of years, and I have to say I’m not very happy with it largely due to the complexity in updating and especially upgrades. The only advantage is that it extends the life of inexpensive networking hardware.

Читайте также:  Kali linux one shot

However, if your plan is to have a network gateway on amd64 hardware, my recommendation is pfSense. The guts of it (FreeBSD) may seem somewhat foreign and complex, but the interface is extremely easy to use, and updates and upgrades are easy, and it has all of the tools required to manage the device and network built into the interface, basically meaning it is almost never require to do anything at the command line level.

As for network-based antivirus protection, this is difficult in implementation and will cause problems while likely never solving any. The primary reason anyone runs anti-virus is because they are told to or superstition. The best protection is keeping software updated and running adblockers. pfSense does have a tool called pfBlocker-NG which can filter out a lot of bad stuff at the network level with minimal intrusion or instability, but this is a networking filter not an antivirus.

Источник

Can I use Linux Mint to act as a router?

Can I use Mint as a Router service, similar to the service in Ubuntu (called: Router Advertisement Daemon?). Does Mint support this and what solutions are available for this? Have dabbled in Linux very briefly, but almost no experience on how to install or find programs, so please explain in detail! Thanks!! EDIT: I’m looking for something easy and simple, like what Virtual Router or Connectify does for Windows 7.

3 Answers 3

You can use almost any linux distribution as a router; You’d want to install dhcpd , the DHCP server, and dnsmasq , a DNS forwarder. Beyond that, you’d simply configure the system firewall to pass traffic from your LAN interface to the WAN interface (Anyone that’s messed with iptables is laughing at this statement. It can quickly get fairly complex). If you have a wireless card, you can also bridge that ethernet device with your LAN device to make the behave as one.

Depending on how manual you want this process to be, you might look around for distributions configured specifically to behave as routers. They will often include web-based configuration tools, to make management similar to conventional embedded consumer routers. Linux Mint may not be the best option for this problem, and if you can use something else, take a look at the following:

DD-WRT is a very powerful linux-based routing distribution, and can run on many consumer routers or on x86-based systems (read, most PCs). If you can use any distribution, I would recommend trying this package out.

pfSense is another very powerful router package, based instead on NetBSD. This is what I run on my router because there are a few necessary features which I needed for my setup (multi-homing, to be specific).

Источник

ПК с Linux Mint 19.3 в качестве маршрутизатора

Добрый день !
Покоряя просторы Интернета наткнулся на вот такую статью-инструкцию https://andreyex.ru/ubuntu/kak. ic-beaver/, и решил попробовать, блога ПК с Linux Mint 19.3 есть, и так, что сделал:

Realtek RTL810xE PCI Express Fast Ethernet vendor: Gigabyte driver: r8169 IF: enp3s0 (локалка)

Читайте также:  Linux узнать какие процессы запущены

VIA VT6105/VT6106S [Rhine-III] vendor: D-Link System DFE-520TX Fast PCI IF: enp4s1 (интернет)

network:
ethernets:
enp4s1:
dhcp4: true
enp3s0:
addresses:
— 192.168.137.1/24
dhcp4: false
nameservers:
addresses:
— 8.8.8.8
— 8.8.4.4
search: []
version: 2

2. Далее настроил DHCP со следующим содержанием:

option domain-name «whatever.you.want»;
option domain-name-servers 8.8.8.8, 8.8.4.4;

default-lease-time 600;
max-lease-time 7200;

subnet 192.168.137.0 netmask 255.255.255.0 range 192.168.137.101 192.168.137.200;
option subnet-mask 255.255.255.0;
option routers 192.168.137.1;
option broadcast-address 192.168.137.255;
>

2.1 После выполнения нужных команд по DHCP получил статус ACTIVE

3. Настроил ФАЙЕРВОЛ как в инструкции
3.1. Создал файл rc.local со следующим содержанием + сделал его исполняемым:

# Default policy to drop all incoming packets.

# Accept incoming packets from localhost and the LAN interface.

iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i enp3s0 -j ACCEPT

# Accept incoming packets from the WAN if the router initiated the connection.

iptables -A INPUT -i enp4s1 -m conntrack —ctstate ESTABLISHED,RELATED -j ACCEPT

# Forward LAN packets to the WAN.
iptables -A FORWARD -i enp3s0 -o enp4s1 -j ACCEPT

# Forward WAN packets to the LAN if the LAN initiated the connection.
iptables -A FORWARD -i enp4s1 -o enp3s0 -m conntrack —ctstate ESTABLISHED,RELATED -j ACCEPT

# NAT traffic going out the WAN interface.
iptables -t nat -A POSTROUTING -o enp4s1 -j MASQUERADE

# rc.local needs to exit with 0

После этого перезагрузил ПК и получил следующие результаты:
1. На ПК который маршрутизатор Интернет есть + также пингуется 2 ПК который подключен к локальное сети
2. Пингуется ПК маршрутизатор со 2 ПК
3. Интернета на 2 Пк нету

Подскажите, что неправильно настроено

Источник

Linux Mint Forums

How to configure Linux Mint sever as a router

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

How to configure Linux Mint sever as a router

Post by Brahim Salem » Wed Apr 30, 2014 10:26 am

I have two network interfaces cards, 8 PCs, a switch and a modem and I want to set up a lab with a server and clients and share connection among them.

Image Image
However, I have a few issues:

1- I am unable to connect any PC to the internet or configure my network cards
2- I don’t know how to assign an IP address to every PC (IPTables Configuration)
3- I have tried to follow these tutorials but they are too difficult for me:
a- http://www.yourownlinux.com/2013/07/how . outer.html
b- http://ubuntuforums.org/showthread.php?t=1942304
c- http://askubuntu.com/questions/376717/h . s-a-router

4- I want to know if there is any useful application with graphical interface that configures things automatically.

Please do help because this is a crucial to me and here where I live there are a few people who know how to configure a Linux OS. Please guide me through this step by step because I need to teach that to many school teachers in my town who want to replace the old XP and 7 labs with Linux Mint.

Excuse my non-technical language because when it comes to networking, I’m a total hick

PS: is it possible to do this as well http://askubuntu.com/questions/249728/h . r-a-school
Many thanks in advance

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Источник

Оцените статью
Adblock
detector