From 06906b65455afdabf211eea2c8c1e14611f8e442 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zolt=C3=A1n=20Felleg?= Date: Wed, 13 Feb 2019 15:25:48 +0100 Subject: [PATCH] Updated efg.pm.f29 (first step of migrating to the new ip addresses). --- .../efg.pm.f29/firstboot/01_setupnetworking.sh | 17 +++-------------- .../firstboot/11_iptables_set_efg_rules.sh | 2 +- sources/efg.pm.f29/firstboot/definitions | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/sources/efg.pm.f29/firstboot/01_setupnetworking.sh b/sources/efg.pm.f29/firstboot/01_setupnetworking.sh index f1c81e4..b173c0a 100755 --- a/sources/efg.pm.f29/firstboot/01_setupnetworking.sh +++ b/sources/efg.pm.f29/firstboot/01_setupnetworking.sh @@ -37,17 +37,6 @@ do CONNECTIONS=$(nmcli --terse connection show | wc -l) done -#CONNECTION_LINE_PM=$(nmcli --terse connection show | grep ":${PM_DEVICE}$") -#CONNECTION_LINE_DYNAMIC=$(nmcli --terse connection show | grep ":${DYNAMIC_DEVICE}$") -#CONNECTION_LINE_STATIC=$(nmcli --terse connection show | grep ":${STATIC_DEVICE}$") -#CONNECTION_UUID_PM=$(echo $CONNECTION_LINE_PM | cut -f 2 -d ':') -#CONNECTION_UUID_DYNAMIC=$(echo $CONNECTION_LINE_DYNAMIC | cut -f 2 -d ':') -#CONNECTION_UUID_STATIC=$(echo $CONNECTION_LINE_STATIC | cut -f 2 -d ':') - -#nmcli connection delete uuid "$CONNECTION_UUID_PM" -#nmcli connection delete uuid "$CONNECTION_UUID_DYNAMIC" -#nmcli connection delete uuid "$CONNECTION_UUID_STATIC" - nmcli connection show nmcli connection add \ @@ -69,8 +58,8 @@ nmcli connection add \ connection.id dynamic \ connection.interface-name $DYNAMIC_DEVICE \ connection.type 802-3-ethernet \ - ipv4.addresses "192.168.65.1/24" \ - ipv4.gateway "192.168.65.254" \ + ipv4.addresses "192.168.65.1/24, 194.149.40.146/28" \ + ipv4.gateway "194.149.40.145" \ ipv4.method "manual" \ save yes @@ -101,5 +90,5 @@ ip route add 192.168.43.0/24 via 192.168.173.1 dev eth0 table dynamic ip route add 10.228.0.0/16 via 192.168.173.1 dev eth0 table static ip route add 192.168.42.0/24 via 192.168.173.1 dev eth0 table static ip route add 192.168.43.0/24 via 192.168.173.1 dev eth0 table static -ip route add default via 192.168.65.254 dev efgd table dynamic +ip route add default via 194.149.40.145 dev efgd table dynamic ip route add default via 84.2.25.193 dev efgs table static diff --git a/sources/efg.pm.f29/firstboot/11_iptables_set_efg_rules.sh b/sources/efg.pm.f29/firstboot/11_iptables_set_efg_rules.sh index ad6a36f..503a897 100755 --- a/sources/efg.pm.f29/firstboot/11_iptables_set_efg_rules.sh +++ b/sources/efg.pm.f29/firstboot/11_iptables_set_efg_rules.sh @@ -500,7 +500,7 @@ $IPTABLES --table filter --append OUTPUT \ $IPTABLES --table nat --append POSTROUTING \ --source ${USR_NET},${SR_NET},$IN_NET \ --out-interface $EXTERNAL_IF_DYNAMIC \ - --jump SNAT --to-source $DYNAMIC_MANAGEMENT_IP + --jump SNAT --to-source $PUBLIC_IP_146 # snat packets # from the usr, sr and in networks $IPTABLES --table nat --append POSTROUTING \ diff --git a/sources/efg.pm.f29/firstboot/definitions b/sources/efg.pm.f29/firstboot/definitions index 9b46e0d..98476ac 100644 --- a/sources/efg.pm.f29/firstboot/definitions +++ b/sources/efg.pm.f29/firstboot/definitions @@ -40,6 +40,20 @@ PUBLIC_IP_204=84.2.25.204 PUBLIC_IP_205=84.2.25.205 PUBLIC_IP_206=84.2.25.206 +PUBLIC_IP_146=194.149.40.146 +PUBLIC_IP_147=194.149.40.147 +PUBLIC_IP_148=194.149.40.148 +PUBLIC_IP_149=194.149.40.149 +PUBLIC_IP_150=194.149.40.150 +PUBLIC_IP_151=194.149.40.151 +PUBLIC_IP_152=194.149.40.152 +PUBLIC_IP_153=194.149.40.153 +PUBLIC_IP_154=194.149.40.154 +PUBLIC_IP_155=194.149.40.155 +PUBLIC_IP_156=194.149.40.156 +PUBLIC_IP_157=194.149.40.157 +PUBLIC_IP_158=194.149.40.158 + # modem management addresses DYNAMIC_MANAGEMENT_IP=192.168.65.1 STATIC_MANAGEMENT_IP=192.168.210.1 -- 2.54.0