Updated efg.pm.f29 (first step of migrating to the new ip addresses).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Wed, 13 Feb 2019 14:25:48 +0000 (15:25 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Wed, 13 Feb 2019 14:25:48 +0000 (15:25 +0100)
sources/efg.pm.f29/firstboot/01_setupnetworking.sh
sources/efg.pm.f29/firstboot/11_iptables_set_efg_rules.sh
sources/efg.pm.f29/firstboot/definitions

index f1c81e4dada91f53901a7be83f1f22df0fe29727..b173c0a9ada923c341c68e0f1b110919b308c909 100755 (executable)
@@ -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
index ad6a36fc7afee6e09ee21f7ae91b30928059ba5d..503a897d7e0b6a36f6c4a08bafe71f754d349ea9 100755 (executable)
@@ -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 \
index 9b46e0d538b03b4afbbc796fb55ee4dc5f6696a6..98476ac182deca68e874de2d386271c32ddde06a 100644 (file)
@@ -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