Outils pour utilisateurs

Outils du site


public:use_raspberry_4_as_router

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
public:use_raspberry_4_as_router [2025/02/28 16:00] pcoudercpublic:use_raspberry_4_as_router [2025/03/01 11:15] (Version actuelle) pcouderc
Ligne 1: Ligne 1:
 ====== Use Raspberry pi 4 as router ====== ====== Use Raspberry pi 4 as router ======
  
-==== Why ? ====+===== Why ? =====
  
 Why not use the router provided by the ISP ? Why not use the router provided by the ISP ?
Ligne 7: Ligne 7:
 The problem has arised for a QOS problem : the need to give some priority to some services like SIP for asterisk PABX.  The problem has arised for a QOS problem : the need to give some priority to some services like SIP for asterisk PABX. 
  
-==== How ? ====+===== How ? =====
  
 Use tutorial to install you pi4. For this use, as the pi4 is fully dedicated to the router function, we work as root, disable any password communication and connect with ssh keys. Use tutorial to install you pi4. For this use, as the pi4 is fully dedicated to the router function, we work as root, disable any password communication and connect with ssh keys.
Ligne 15: Ligne 15:
 === on recent systems === === on recent systems ===
  
-Install ifupdown, remove various+Install ifupdown :
  
 <code> <code>
Ligne 23: Ligne 23:
 === on old raspbian === === on old raspbian ===
  
-DHCPCD is standard on raspbian, but for this use it is not clear that it has advantages over good old networking service. So it is disabled (source  [[https://raspberrypi.stackexchange.com/questions/78510/disable-dhcpcd-service-for-static-ip|here]]).+DHCPCD was standard on raspbian, but for this use it is not clear that it has advantages over good old networking service. So it is disabled (source  [[https://raspberrypi.stackexchange.com/questions/78510/disable-dhcpcd-service-for-static-ip|here]]).
  
 <code> <code>
Ligne 48: Ligne 48:
         dns-search couderc.eu         dns-search couderc.eu
 </code> </code>
-=== After on old systems ===+=== Then on old systems ===
 <code> <code>
 ifup eth0 ifup eth0
Ligne 55: Ligne 55:
  
  
-=== After on recent systems ===+=== Then on recent systems === 
 +We need to stop all netword stuff...
 <code> <code>
 +systemctl stop systemd-networkd.socket systemd-networkd  systemd-networkd-wait-online NetworkManager ModemManager 
 +systemctl disable systemd-networkd.socket systemd-networkd  systemd-networkd-wait-online NetworkManager ModemManager
 </code> </code>
-=== Connect to internet ===+An now, reboot...
  
-You need to connect your box configured to pass all traffic to the pi. This done with an additional physical adapter from USB3 to RJ45. Here we use a subnetwork, but PPPOE is described late+=== Connect to internet box === 
 + 
 +You need to connect your box configured to pass all traffic to the pi. This done with an additional physical adapter from USB3 to RJ45. Here we use a subnetwork from the box (with usually double NAT...), but PPPOE is described later
  
 So we add a second interface : So we add a second interface :
Ligne 79: Ligne 83:
  
 The last line will be explained later. The last line will be explained later.
 +
 +=== Connect to PPPoE interface ===
 +Install :!
 +<code>
 +apt install  pppoe ppp iptables  vlan pppoeconf
 +</code>
 +Note vlan is optional,
 +Add an initial setting for eth1 (eth1.4001 in the example for 4001 vlan :
 +<code>
 +auto eth1.4001
 +iface eth1.4001 inet static
 +</code>
 +Be ready to provide user and passsword provided by your ISP, and recommended mtu :
 +<code>
 +pppoeconf eth1.4001
 +ip a
 +</code>
 +If no problem ppp0 link will show your ip address...
  
 === Routing === === Routing ===
public/use_raspberry_4_as_router.1740758405.txt.gz · Dernière modification : 2025/02/28 16:00 de pcouderc

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki