0
I am currently trying to build a home server. This home server will do a lot of things such as acting as a NAS, a media server, file server, etc, and also a router. This pc has one ethernet port on the motherboard (let's call it eth0, or wan) and 4 ethernet ports on a pcie card (let's call them eth1, eth2, eth3, eth4). eth0 is currently receiving it's ip address trough dhcp from the isp. What I'd like is for eth1, eth2, eth3 and eth4 to all be set to 192.168.0.1/24 so that connected devices can get their ip from the dhcp server on the home server as if it was a normal router. Connected devices must be able to talk to each other and also be able to access internet.
The thing is I lack the knowledge on how to merge eth1, eth2, eth3 and eth4 into a single virtual interface and bridge them with eth0 so they can have internet access. How is it possible to do this (With network manager cli ideally, as it is required for me)? Thanks !
Is eth0/wan directly connected to your ISP (modem only, you only get a single IP address), or is it connected to a home router or router provided by your ISP that can give out a range of IP addresses? Depending on that, the recommended setup is completely different. In the first case, your home "server" (which acts more as a "home main router + server") will also have to do NAT and DHCP and possibly DNS proxying. In the second case, just bridge eth0, eth1, ..., eth4, then you have a "home server + switch", and let your main router do its job. – dirkt – 2019-08-22T08:11:11.847
It is connected to a router+modem that the ISP provides. Yes, just bridging is a good option and you're right. I just tought it would be interesting to make it a router since I also wanted to do things like firewall (iptables), dns forwarding (unbound), adblocking (also unbound) since the isp router don't do any of that. – Mog01 – 2019-08-23T01:39:55.680