Ajustement des routes dans /etc/network/interfaces + correction de la syntaxe
This commit is contained in:
parent
6dd2d19fc8
commit
7c6851eabc
@ -1,6 +1,5 @@
|
|||||||
# This file describes the network interfaces available on your system
|
# This file describes the network interfaces available on your system
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
# and how to activate them. For more information, see interfaces(5).
|
||||||
|
|
||||||
# The loopback network interface
|
# The loopback network interface
|
||||||
#auto lo
|
#auto lo
|
||||||
#iface lo inet loopback
|
#iface lo inet loopback
|
||||||
@ -22,7 +21,10 @@ allow-hotplug enp0s9
|
|||||||
iface enp0s9 inet static
|
iface enp0s9 inet static
|
||||||
address 192.168.1.2
|
address 192.168.1.2
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
up route add -net 172.16.128.0/24 gw 192.168.1.2
|
post-up ip route add 172.16.128.0/24 via 192.168.1.2
|
||||||
|
post-up ip route add 172.16.0.0/24 via 192.168.1.1
|
||||||
|
post-up ip route add 192.168.200.0/24 via 192.168.1.1
|
||||||
|
|
||||||
# up route add -net 172.16.128.0/24 gw 192.168.0.52
|
# up route add -net 172.16.128.0/24 gw 192.168.0.52
|
||||||
# up route add default gw 192.168.1.1
|
# up route add default gw 192.168.1.1
|
||||||
# post-up /bin/bash /root/iptables-vpn
|
# post-up /bin/bash /root/iptables-vpn
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# This file describes the network interfaces available on your system
|
# This file describes the network interfaces available on your system
|
||||||
# and how to activate them. For more information, see interfaces(5).
|
# and how to activate them. For more information, see interfaces(5).
|
||||||
|
|
||||||
# The loopback network interface
|
# The loopback network interface
|
||||||
#auto lo
|
#auto lo
|
||||||
#iface lo inet loopback
|
#iface lo inet loopback
|
||||||
@ -22,7 +21,9 @@ allow-hotplug enp0s9
|
|||||||
iface enp0s9 inet static
|
iface enp0s9 inet static
|
||||||
address 192.168.0.52
|
address 192.168.0.52
|
||||||
netmask 255.255.255.0
|
netmask 255.255.255.0
|
||||||
# up route add -net 192.168.1.0/24 gw 172.16.128.254
|
post-up ip route add 192.168.1.0/24 via 172.16.128.254/24
|
||||||
up route add -net 192.168.1.0/24 gw 192.168.0.52
|
post-up ip route add 172.16.0.0/24 via 172.16.128.254/24
|
||||||
|
|
||||||
|
# up route add -net 192.168.1.0/24 gw 192.168.0.52
|
||||||
# post-up /bin/bash /root/iptables-vpn
|
# post-up /bin/bash /root/iptables-vpn
|
||||||
post-up /etc/init.d/ipsec restart
|
post-up /etc/init.d/ipsec restart
|
@ -7,7 +7,7 @@ conn tunnel #
|
|||||||
left=192.168.0.52
|
left=192.168.0.52
|
||||||
leftsubnet=172.16.128.0/24
|
leftsubnet=172.16.128.0/24
|
||||||
right=192.168.0.51
|
right=192.168.0.51
|
||||||
rightsubnet=192.168.0.0/16, 172.16.0.0/24
|
rightsubnet=192.168.1.0/24, 192.168.200.0/24, 172.16.0.0/24
|
||||||
ike=aes256-sha2_256-modp1024!
|
ike=aes256-sha2_256-modp1024!
|
||||||
esp=aes256-sha2_256!
|
esp=aes256-sha2_256!
|
||||||
keyingtries=0
|
keyingtries=0
|
||||||
|
@ -5,7 +5,7 @@ config setup
|
|||||||
conn %default
|
conn %default
|
||||||
conn tunnel #
|
conn tunnel #
|
||||||
left=192.168.0.51
|
left=192.168.0.51
|
||||||
leftsubnet=192.168.0.0/16, 172.16.0.0/24
|
leftsubnet=192.168.1.0/24, 192.168.200.0/24, 172.16.0.0/24
|
||||||
right=192.168.0.52
|
right=192.168.0.52
|
||||||
rightsubnet=172.16.128.0/24
|
rightsubnet=172.16.128.0/24
|
||||||
ike=aes256-sha2_256-modp1024!
|
ike=aes256-sha2_256-modp1024!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user