Je cherche à ajouter une seconde carte réseau qui me permettra de sauvegarder mes backups sur un disque distant ainsi que de faire un rscync de /var/mail
Donc j’ai modifié mon fichier /etc/network/interfaces
Mais, au reboot mon site web n’était plus accessible
J’ai remis mon ancien fichier /etc/network/interfaces et il est à nouveau accessible
contenu de /etc/network/interfaces
This file describes the network interfaces available on your system
and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
The loopback network interface
auto lo
iface lo inet loopback
The primary network interface
allow-hotplug eno8303
iface eno8303 inet dhcp
This is an autoconfigured IPv6 interface
iface eno8303 inet6 auto
modification apporter que j’ai dû supprimer afin de retrouver l’accès à mon site web
allow-hotplug eno8403
iface eno 8403 inet dhcp
Y a t’il une commande qui puisse refaire la configuration réseau en tenant compte des 2 cartes réseaux ?
My French is good enough, with the bits of English in between, to read your problem, buut… Not good enough to answer in French
Before looking at configuring the second card, could you elaborate on the reason to add another network card just for backup? (I can think of some reasons, but most people who have the reasons I think of, have enough experience configuring network cards ). In general, without planning your network, adding network cards means adding headaches.
Would you mind editing your post, and enclose the contents of /etc/network/interfaces between ‘backticks’ (`)? Start with three of them on an empty line, then your text, and after that three of ``` on an empty line again.
2 NIC on a machine is almost never au good practice (except for link aggregation). But anyway, if you really want to use 2 NIC (or if you don’t have any other solution), you have to deal with IP routes on your yunohost machine.
I think your problem is that the default route use your second NIC instead of the first one.
Could you post the answer of ip -d route command?
With only eno8303 active : ( webserver accesible )
default via 192.168.1.10 dev eno8303
192.168.1.0/24 dev eno8303 proto kernel scope link src 192.168.1.33
with eno8303 and 8403 active
unicast defaut via ( ipgateway lan ) dev eno8403 proto boot scoop global onlink
uncast ( ip gatewaylan / 24 ) dev eno8403 proto kernel scoop link source ( ip eno8403 )
I think you have to give the second NIC a (much) higher metric. That makes sure traffic almost never hits that card, only when it is destined especially for the connection to your ‘home’ network. That, in combination with giving the Internet NIC a default gateway and the other one not, should work.
You can set the metric by adding it to the stanza for the interfaces like
Was setting the metric the only addition you had to make? Would you mind, for other users, to post the routes you configured (if so) and whether firewall rules were needed?