Configuration passerelle Linux Mint Tricia 19.3
Configuration passerelle Linux Mint 19.3 Tricia(Coco)
Mon PC Passerelle est équipé de deux interfaces internet :
1- enp3s0 = interface Lan adresse fixe 192.168.0.100
2- enp58s2 = interface Wan adresse fixe 192.168.1.100
Routeur freebox : 192.168.1.254
Box = Freebox Crystal
J’ai deux autres PC :
1- Pc Portable HP sous linux Tricia adresse Ip délivrée par le serveur isc-dhcp : 192.168.0.2
2- Pc Moyen tour sous windows 10, adresse Ip délivrée par serveur isc-dhcp : 192.168.0.5
Je n'arrive à faire fonctionner la passerelle: pas d'accès internet depuis les 2 PC ci-dessus, mais j'accède bien à la passerelle en SSH depuis ces 2 PC
Merci de me dire ce que j'ai oublié ou ce que je dois corriger
Cordialement
Htitus
Ma config :
Commande ifconfig :
Commande route -n :
Dans le fichier sysctl.conf la ligne net.ipv4.ip_forward est décommentée :
J’utilise Shorewall (/etc/shorewall) :
le fichier masq :
Le fichier interfaces :
Le fichier zones :
Le fichier policy :
Le fichier rules :
Dans le fichier /etc/shorewall/shorewall.conf : STARTUP_ENABLED=Yes
Dans le chier etc/default/shorewall :
--
Mon PC Passerelle est équipé de deux interfaces internet :
1- enp3s0 = interface Lan adresse fixe 192.168.0.100
2- enp58s2 = interface Wan adresse fixe 192.168.1.100
Routeur freebox : 192.168.1.254
Box = Freebox Crystal
J’ai deux autres PC :
1- Pc Portable HP sous linux Tricia adresse Ip délivrée par le serveur isc-dhcp : 192.168.0.2
2- Pc Moyen tour sous windows 10, adresse Ip délivrée par serveur isc-dhcp : 192.168.0.5
Je n'arrive à faire fonctionner la passerelle: pas d'accès internet depuis les 2 PC ci-dessus, mais j'accède bien à la passerelle en SSH depuis ces 2 PC
Merci de me dire ce que j'ai oublié ou ce que je dois corriger
Cordialement
Htitus
Ma config :
Commande ifconfig :
henry@Coco:~$ ifconfig
enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.100 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::76d0:2bff:fea1:32eb prefixlen 64 scopeid 0x20<link>
ether 74:d0:2b:a1:32:eb txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 117 bytes 40225 (40.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp5s2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::9c34:f65b:e219:8f73 prefixlen 64 scopeid 0x20<link>
inet6 2a01:e34:ee0c:2450:1e6d:8278:5888:61e0 prefixlen 64 scopeid 0x0<global>
inet6 2a01:e34:ee0c:2450:cc1a:b0e2:ed37:53d3 prefixlen 64 scopeid 0x0<global>
ether c0:25:e9:1d:cc:d1 txqueuelen 1000 (Ethernet)
RX packets 131190 bytes 178555325 (178.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 78060 bytes 6558895 (6.5 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Boucle locale)
RX packets 1075 bytes 132120 (132.1 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1075 bytes 132120 (132.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Commande route -n :
henry@Coco:~$ route -n
Table de routage IP du noyau
Destination Passerelle Genmask Indic Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 100 0 0 enp5s2
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 enp3s0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 enp3s0
192.168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 enp5s2
Dans le fichier sysctl.conf la ligne net.ipv4.ip_forward est décommentée :
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
J’utilise Shorewall (/etc/shorewall) :
le fichier masq :
#INTERFACE SUBNET ADDRESS PROTO PORT(S)
enp5s2 enp3s0
#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
Le fichier interfaces :
#ZONE INTERFACE BROADCAST OPTIONS
net enp5s2 detect
loc enp3s0 detect
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
Le fichier zones :
#ZONE DISPLAY COMMENTS
fw firewall
net ipv4
loc ipv4
#LAST LINE - ADD YOUR ENTRIES ABOVE THIS ONE - DO NOT REMOVE
Le fichier policy :
#SOURCE DEST POLICY LOG LIMIT:BURST
# LEVEL
#
# THE FOLLOWING POLICY MUST BE LAST
#
loc net ACCEPT
loc $FW ACCEPT -
fw loc ACCEPT
fw net ACCEPT
all all ACCEPT
net all DROP info
#LAST LINE -- DO NOT REMOVE
Le fichier rules :
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/
# PORT PORT(S) DEST LIMIT GROUP
ACCEPT loc $FW tcp 20,21,22,25,37,53,80,123,135,137,139,143,443,444,445,631,953,8000,8080,8200,10000,24441
ACCEPT loc $FW udp 37,53,67,68,123,135,137,138,445
ACCEPT loc net tcp 20,21,22,25,37,53,80,123,143,443,24441
ACCEPT $FW net tcp www
ACCEPT $FW net icmp 8
ACCEPT $FW net tcp www,22,25,37,53,110,123,443,465,587
ACCEPT $FW net udp 37,123
ACCEPT $FW loc tcp 53,123,137,139,445,631,953,8080,8200,10000
ACCEPT $FW loc udp 53,67,68,123,137,138,139,445
ACCEPT $FW dock tcp 443
ACCEPT net fw icmp 0,3,11
#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
Dans le fichier /etc/shorewall/shorewall.conf : STARTUP_ENABLED=Yes
Dans le chier etc/default/shorewall :
startup=1
--
A voir également:
- Configuration passerelle Linux Mint Tricia 19.3
- Ethernet n'a pas de configuration ip valide - Guide
- Linux mint 22.1 - Accueil - Linux
- Télécharger linux mint - Télécharger - Systèmes d'exploitation
- Panneau de configuration - Guide
- Linux mint ou ubuntu - Guide