Setup wwan0 as default connection

loic3484

New Member
Joined
Sep 6, 2023
Messages
2
Reaction score
0
Credits
21
Hi everyone,

I am using a gateway where I have :
  1. wifi
  2. 4g
  3. canbus
  4. eth0 & eth01 (2 separated ethernet port)
  5. wg0 (wireguard VPN)
I would like to setup this configuration:
  1. Only use 4g connection as internet connection ( be the default route)
  2. Share internet on the eth0 port for my PLC ( automation)
  3. Keep eth01 for local ssh debug.
I resume it with this picture:
archi.png

  • you can find here the resultat of netstat -nr
Destination Gateway Genmask Flags MSS Window irtt Iface

0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth1

0.0.0.0 77.136.55.254 0.0.0.0 UG 0 0 0 wwan0

77.136.55.252 0.0.0.0 255.255.255.252 U 0 0 0 wwan0

172.16.0.0 0.0.0.0 255.255.254.0 U 0 0 0 wg0

172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0

192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1

  • and here the interfaces
# Include files from /etc/network/interfaces.d:

source /etc/network/interfaces.d/*

allow-hotplug eth02

iface eth0 inet static

address 192.168.1.23

netmask 255.255.255.0

#gateway 192.168.1.1

#dns-nameservers 0.0.0.0

Thx you for your help
 


I am afraid I have to ask for more information. Usually all this is done on a router not a computer. Are you using a router for the internet or are you trying to use the outdated method of using a PC to do the router job also?

I am thinking the latter, so I would ask why not just hook up a router and let it take care of everything.
 
Hello,
Thx it is a computer with a 4g interface on it. I will use it as a router :)
it is a gatway installed on site for IOT. So the less equipment you have the better it is.
I fix it. It was due to nmcli. I do not know why but nmcli was already installed and create bugs with /etc/network/interfaces.
I configured everything with nmcli

Code:
nmcli connection modify GSM ipv4.route-metric 0
nmcli connection modify ETH0 ipv4.addresses xxxxxxx/xx
nmcli connection modify ETH0 ipv4.method manual

nmcli connection modify ETH1 ipv4.addresses xxxxxxx/xx
nmcli connection modify ETH1 ipv4.method manual

It is working
 
I do not know why but nmcli was already installed and create bugs with /etc/network/interfaces.
I configured everything with nmcli

NetworkManager has been the default on most Linux Distro's for quite a while now.
You are correct, it isn't compatible with the old network.d
 

Members online


Top