User Tools

Site Tools


настройка_шлюза_в_классе

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
настройка_шлюза_в_классе [2016/11/30 10:24]
val [FreeBSD/Ubuntu]
настройка_шлюза_в_классе [2020/09/29 16:16]
val [DNS]
Line 3: Line 3:
 ===== ISP1 ===== ===== ISP1 =====
  
-==== FreeBSD/​Ubuntu ====+==== FreeBSD/Debian/Ubuntu ====
  
   * Сменить пароль   * Сменить пароль
Line 59: Line 59:
 </​code>​ </​code>​
  
-==== Ubuntu ====+==== Debian/Ubuntu ====
 <​code>​ <​code>​
 root@nessus.isp.un:​~#​ cat /​etc/​hostname root@nessus.isp.un:​~#​ cat /​etc/​hostname
Line 84: Line 84:
 root@nessus.isp.un:​~#​ sh nat.sh root@nessus.isp.un:​~#​ sh nat.sh
  
-root@nessus.isp.un:​~#​ iptables-save ​-c > /​etc/​iptables.rules+root@nessus.isp.un:​~#​ iptables-save > /​etc/​iptables.rules
 </​code><​code>​ </​code><​code>​
 root@nessus.isp.un:​~#​ cat /​etc/​network/​interfaces root@nessus.isp.un:​~#​ cat /​etc/​network/​interfaces
Line 93: Line 93:
 auto eth0 auto eth0
 iface eth0 inet static iface eth0 inet static
-        pre-up iptables-restore ​-c < /​etc/​iptables.rules +        pre-up iptables-restore < /​etc/​iptables.rules 
-        address 10.N.M.252+        address 10.N.M.178
         netmask 255.255.255.0         netmask 255.255.255.0
         gateway 10.N.M.254         gateway 10.N.M.254
Line 105: Line 105:
 # up route add -net 192.168.1.0 netmask 255.255.255.0 gw 172.16.1.1 # up route add -net 192.168.1.0 netmask 255.255.255.0 gw 172.16.1.1
 # ... # ...
-# up route add -net 192.168.20.0 netmask 255.255.255.0 gw 172.16.1.20+# up route add -net 192.168.55.0 netmask 255.255.255.0 gw 172.16.1.55
 </​code><​code>​ </​code><​code>​
-# cat route.sh+# cat route.bash
 </​code><​code>​ </​code><​code>​
-for i in `jot 20 1`+for i in {1..55}
 do do
         #route add -net 192.168.${i}.0 netmask 255.255.255.0 gw 172.16.1.${i}         #route add -net 192.168.${i}.0 netmask 255.255.255.0 gw 172.16.1.${i}
-        #echo up route add -net 192.168.${i}.0 netmask 255.255.255.0 gw 172.16.1.${i}+        #echo " ​ " ​up route add -net 192.168.${i}.0 netmask 255.255.255.0 gw 172.16.1.${i}
 done done
 </​code><​code>​ </​code><​code>​
-root@nessus.isp.un:​~#​ cat createuser.sh+root@nessus.isp.un:​~#​ cat createuser.bash
 </​code><​code>​ </​code><​code>​
-for i in `jot 20 1`+for i in {1..55}
 do do
         echo $i         echo $i
Line 134: Line 134:
   * [[Сервис MTA]] для зоны isp.un   * [[Сервис MTA]] для зоны isp.un
  
-=== DNS ===+===== DNS =====
  
   * [[Сервис DNS]]   * [[Сервис DNS]]
Line 195: Line 195:
 openvas.isp ​    ​A ​      ​172.16.1.252 openvas.isp ​    ​A ​      ​172.16.1.252
  
 +$GENERATE 1-9 router$.isp A 172.16.1.19$
  
-;for un2bsd2un3, asterisk2+;for lin2lin3lin5, asterisk2
 ;$GENERATE 1-26 ns$ A 172.16.1.$ ;$GENERATE 1-26 ns$ A 172.16.1.$
 ;$GENERATE 1-26 ns$ A 192.168.$.10 ;$GENERATE 1-26 ns$ A 192.168.$.10
 ;$GENERATE 1-26 corp$ NS ns$ ;$GENERATE 1-26 corp$ NS ns$
  
-; for uncom, un1, bsd1+;for lin1
 ;$GENERATE 27-37 server.corp$ A 172.16.1.$ ;$GENERATE 27-37 server.corp$ A 172.16.1.$
  
Line 246: Line 247:
 ;$GENERATE 1-9 comp$ A 172.16.1.20$ ;$GENERATE 1-9 comp$ A 172.16.1.20$
  
-;for mscun4, unbez+;for lin7lin3
 $GENERATE 38-55 server.corp$ A 192.168.$.10 $GENERATE 38-55 server.corp$ A 192.168.$.10
 $GENERATE 38-55 www.corp$ A 192.168.$.20 $GENERATE 38-55 www.corp$ A 192.168.$.20
-$GENERATE ​39-55 gate.corp$ A 192.168.$.1+$GENERATE ​38-55 gate.corp$ A 192.168.$.1 
 +$GENERATE 38-55 router.corp$ A 192.168.$.1 
 +$GENERATE 38-55 switch.corp$ A 192.168.$.3 
 +$GENERATE 38-55 switch1.corp$ A 192.168.$.3 
 +$GENERATE 38-55 switch2.corp$ A 192.168.$.4 
 +$GENERATE 38-55 switch3.corp$ A 192.168.$.5
 ;$GENERATE 1-9 lan.corp$ A 192.168.10$.10 ;$GENERATE 1-9 lan.corp$ A 192.168.10$.10
 $GENERATE 38-55 lan.corp$ A 192.168.1$.10 $GENERATE 38-55 lan.corp$ A 192.168.1$.10
 $GENERATE 38-55 corp$ A 192.168.$.10 $GENERATE 38-55 corp$ A 192.168.$.10
 $GENERATE 38-55 mgmt.corp$ A 192.168.$.20 $GENERATE 38-55 mgmt.corp$ A 192.168.$.20
- 
 </​code><​code>​ </​code><​code>​
 # cat 192.168.rev # cat 192.168.rev
Line 263: Line 268:
                 NS      ns.un.                 NS      ns.un.
  
-;​$GENERATE ​1-55 1.$ PTR gate.corp$.un. +;for msc, un4, unbez, !!! not for un3 
-$GENERATE ​1-55 1.$ PTR router.corp$.un.+;​$GENERATE ​40-55 1.$ PTR gate.corp$.un. 
 +$GENERATE ​40-55 1.$ PTR router.corp$.un.
  
-$GENERATE ​1-55 10.$ PTR server.corp$.un. +$GENERATE ​40-55 10.$ PTR server.corp$.un. 
-$GENERATE ​1-55 3.$ PTR switch.corp$.un. +$GENERATE ​40-55 3.$ PTR switch.corp$.un. 
-$GENERATE ​1-55 20.$ PTR mgmt.corp$.un.+$GENERATE ​40-55 20.$ PTR mgmt.corp$.un.
 </​code><​code>​ </​code><​code>​
-# cat dns.sh+# cat isp.dns.sh
 </​code><​code>​ </​code><​code>​
 STANDS="​1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25" STANDS="​1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25"
Line 311: Line 317:
 ===== ISP2 ===== ===== ISP2 =====
  
-==== Ubuntu ====+==== Debian/Ubuntu ====
 <​code>​ <​code>​
 +# git clone http://​val.bmstu.ru/​unix/​conf.git
 +
 +# cat conf/​isp2/​readme.txt
 +
 root@gate.isp2.un:​~#​ cat /​etc/​network/​interfaces root@gate.isp2.un:​~#​ cat /​etc/​network/​interfaces
 </​code><​code>​ </​code><​code>​
Line 325: Line 335:
 auto eth0:0 auto eth0:0
 iface eth0:0 inet static iface eth0:0 inet static
-        pre-up iptables-restore ​-c < /​etc/​iptables.rules+        pre-up iptables-restore < /​etc/​iptables.rules
         address 10.N.M.179         address 10.N.M.179
         netmask 255.255.255.0         netmask 255.255.255.0
         gateway 10.N.M.254         gateway 10.N.M.254
- 
-auto eth0:1 
-iface eth0:1 inet static 
-        address 172.16.1.60 
-        netmask 255.255.255.0 
 </​code><​code>​ </​code><​code>​
 root@gate.isp2.un:​~#​ cat nat.sh root@gate.isp2.un:​~#​ cat nat.sh
настройка_шлюза_в_классе.txt · Last modified: 2020/11/28 18:01 by val