5g mobile router and ipfire

Hello, I have a 5g mobile router. IPfire raspberry does not have a sim card. How can I connect ipfire to such a network?

Hi Tomas,

The mobile routers (mobile hotspots) that I am familiar with have the sim card inside of them so the Raspberry Pi wouldn’t need one. The mobile hotspot connects to the 5g network on the internet side and provides a WIFI network hotspot for you to connect to.

The setup to have a Raspberry Pi running IPFire connect would be to set the RED0 interface in the initial setup program to use the wireless device which would use the ‘brcmfmac’ driver (Pi3’s and Pi4’s not sure of others) and set RED0 to use DHCP to get an address.

Once you’ve done that, go to the Web GUI and you should see a ‘Wireless client’ option under the ‘System’ menu. The option only appears if you have the RED0 interface set to the wireless adapter. Select that option and add the network SSID and Passphrase for the WIFI network that the 5g device is providing and you should be good to go.

The SSID and Passphrase would be provided to you by the ISP or set by you with some kind of device setup for the 5g mobile hotspot.

1 Like

Wi-Fi is not very relevant for me. The point is that my router is 5g which works via mobile connection. And I can’t do ipfire with some router instead of this 5g router. The question is whether I can connect ipfire immediately behind the 5g router. How do I set it up?

Can you provide more detail about the setup you’re trying to do and the equipment model for the 5g router?

Are you trying to do a setup like:

Internet -> 5g router -> wired connection to Raspberry Pi?

1 Like

Yes, I need the following setup:
5g router (mobile internet) → wired to Raspberry Pi?

What model of Raspberry Pi are you working with? I’m asking because Pi3’s and Pi4’s have some different requirements depending on the model to work with IPFire.

My Model Pi4

Ok, well the first thing is that you are going to need a usb ethernet dongle. Do you have one handy?

I know how to configure ipfire. My question is what should I set up in ipfire if it won’t be a router? I need a system - 5g router - ipfire firewall. Is that possible? If so, what should I do to prevent ipfire from being a router and just a firewall?

If you want that configuration, set both RED and GREEN to ‘Bridge’ in Zone Configuration and give them both IP addresses on the same subnet as your internal network and your 5g. You would also want to turn off Masquerading for the green zone in Firewall Options.

Bridge: All assigned NICs belong to the same network and IPFire acts like a switch between those NICs

If you decide to do that, I would suggest that you monitor the logs for a while and make sure that the firewall rules are operating as you would expect them to. I’ve never tried this kind of configuration so I don’t know how to advise you of any security implications that you might need to address.

You don’t bridge red and green. You bridge two nics into the same zone, e.g. green

IPFire is designed to have a minimum of two zones, Red and Green. You can’t have less. The setup program will not allow you to complete if you don’t have the two zones and each assigned to a separate NIC.

In the Zone Configuration, if you already have Red and Green assigned to NIC’s in there and change the Red NIC to none and set that NIC to native under green and select Bridge at the top, the zone configuration page will let you do that but I am certain something will not work right when you reboot because you will no longer have a Red zone and that is not allowed.

If you have two NICs bridged they are considered to be one zone, whatever colour you have set them under. In that case they act exactly like a switch and that means that no firewall rules will be processed at all as the rules have been set up for traffic moving from one zone to another, not within one zone.

2 Likes

Hi Adolf,

Thanks for the clarification. Not something that I’ve tried. I was able to set both RED and GREEN to ‘Bridge’ in the Zone Configuration and found that two separate bridges were created. One for RED and a separate one for GREEN.

Stephen

1 Like

Could you post some screenshots of your Zone Configuration?

And is it at all possible that ipfire works next to the router only as a firewall and does not perform the function of a router? Router — ipfire

No it is not possible.
IPFire has been designed to be a router/firewall.

1 Like

What model is this 5G mobile router.

And if I set it like this: 5g router wan- 85.x.x.253 lan 192.168.8.1 then ipfire red ip- 192.168.8.2 gateway 192.168.8.1 and green 192.168.8.3 wouldn’t work like this either?

It will operate in that mode but what it will be doing with the traffic I have no idea.
My suspicion is that as the red and green would then be in the same subnet it will just pass the traffic on without doing anything to it but I am not sure about that.

You would need to review the IPFire code to see what it would do in that sort of situation.
https://git.ipfire.org/?p=ipfire-2.x.git;a=tree

In the past users have ended up putting their red and green networks into the same subnet and their IPFire systems had all sorts of issues, which is why it was flagged up in the forum but they were trying to use IPFire as a router/firewall.

Trying to use IPFire as only a firewall and not as a router, is not what it was designed for so I don’t think I can help any further on this.

1 Like

Is there a raspberry with sim cards? Then, after inserting the SIM card, it would be possible to make a router with a mobile connection.

Hi all,

in here → Using 4G LTE wireless modems on a Raspberry Pi | Jeff Geerling a howto can be found to extend an RaspberryPi with a wireless modems. Since this article is meanwhile a kind of old now and it addresses only 4G, IPFire should be capable to use also 5G → www.ipfire.org - Enabling IPFire for 5G . The wiki → www.ipfire.org - Mobile Networks (LTE/4G/UMTS/3G/2G) does not reflect it currently likewise the compatibility list → www.ipfire.org - Modems but may your project can extend this ?
Was thinking about to use IPFire also for a Camper project but this idea is currently suspended.

Hope some links are helpful.

Best,

Erik

5 Likes