diff --git a/Central-router.startup b/Central-router.startup index e161564..e11f96f 100755 --- a/Central-router.startup +++ b/Central-router.startup @@ -8,3 +8,7 @@ ip route add default via 192.168.0.1 dev eth0 # Gateway IP for DMZ-switch ip addr add 10.0.1.1/24 dev eth1 ip link set up dev eth1 + +# Gateway IP for External-switch +ip addr add 10.0.2.1/24 dev eth2 +ip link set up dev eth2 diff --git a/Ext-DNS.startup b/Ext-DNS.startup new file mode 100755 index 0000000..dcd3d44 --- /dev/null +++ b/Ext-DNS.startup @@ -0,0 +1,10 @@ +# IP of Ext-DNS +ip addr add 10.0.2.4/24 dev eth0 +ip link set up dev eth0 + +# Route to External-switch +ip route add default via 10.0.2.2 dev eth0 + +# Start DNS service +chmod +r /etc/dnsmasq_static_hosts.conf +systemctl start dnsmasq diff --git a/Ext-DNS/etc/dnsmasq.conf b/Ext-DNS/etc/dnsmasq.conf new file mode 100755 index 0000000..ba550eb --- /dev/null +++ b/Ext-DNS/etc/dnsmasq.conf @@ -0,0 +1,10 @@ +interface=eth0 +domain-needed +bogus-priv +no-resolv +no-poll +address=/doubleclick.net/127.0.0.1 +no-hosts +addn-hosts=/etc/dnsmasq_static_hosts.conf +expand-hosts +domain=example.com diff --git a/Ext-DNS/etc/dnsmasq_static_hosts.conf b/Ext-DNS/etc/dnsmasq_static_hosts.conf new file mode 100755 index 0000000..830d413 --- /dev/null +++ b/Ext-DNS/etc/dnsmasq_static_hosts.conf @@ -0,0 +1,2 @@ +201.224.19.7 this.test.com +201.224.19.7 faceybooky.com diff --git a/Ext-DNS/etc/resolvconf/resolv.conf.d/base b/Ext-DNS/etc/resolvconf/resolv.conf.d/base new file mode 100755 index 0000000..caa02b9 --- /dev/null +++ b/Ext-DNS/etc/resolvconf/resolv.conf.d/base @@ -0,0 +1,2 @@ +# hosts external to fido +nameserver 8.8.8.8 diff --git a/Ext-Office.startup b/Ext-Office.startup new file mode 100755 index 0000000..3af4a8d --- /dev/null +++ b/Ext-Office.startup @@ -0,0 +1,6 @@ +# IP of Ext-Office +ip addr add 10.0.2.3/24 dev eth0 +ip link set up dev eth0 + +# Route to External-switch +ip route add default via 10.0.2.2 dev eth0 diff --git a/Ext-Office/etc/resolvconf/resolv.conf.d/base b/Ext-Office/etc/resolvconf/resolv.conf.d/base new file mode 100755 index 0000000..caa02b9 --- /dev/null +++ b/Ext-Office/etc/resolvconf/resolv.conf.d/base @@ -0,0 +1,2 @@ +# hosts external to fido +nameserver 8.8.8.8 diff --git a/Ext-WWW.startup b/Ext-WWW.startup new file mode 100755 index 0000000..3e611c6 --- /dev/null +++ b/Ext-WWW.startup @@ -0,0 +1,11 @@ +# IP of Ext-WWW +ip addr add 10.0.2.5/24 dev eth0 +ip link set up dev eth0 + +# Route to External-switch +ip route add default via 10.0.2.2 dev eth0 + +# Start apache2 web server +a2enmod ssl +a2ensite default-ssl +systemctl start apache2 diff --git a/Ext-WWW/etc/resolvconf/resolv.conf.d/base b/Ext-WWW/etc/resolvconf/resolv.conf.d/base new file mode 100755 index 0000000..caa02b9 --- /dev/null +++ b/Ext-WWW/etc/resolvconf/resolv.conf.d/base @@ -0,0 +1,2 @@ +# hosts external to fido +nameserver 8.8.8.8 diff --git a/Ext-WWW/var/www/index.html b/Ext-WWW/var/www/index.html new file mode 100644 index 0000000..55bda2f --- /dev/null +++ b/Ext-WWW/var/www/index.html @@ -0,0 +1,8 @@ + + + + +

This is the EXT-WWW Internal Webserver

+

You are now connected to an EXTERNAL host!

+ + diff --git a/External-switch.startup b/External-switch.startup new file mode 100755 index 0000000..ef4858a --- /dev/null +++ b/External-switch.startup @@ -0,0 +1,6 @@ +# IP of External-switch +ip addr add 10.0.2.2/24 dev eth0 +ip link set up dev eth0 + +# Gateway IP to Central-router +ip route add default via 10.0.2.1 dev eth0 diff --git a/External-switch/etc/resolvconf/resolv.conf.d/base b/External-switch/etc/resolvconf/resolv.conf.d/base new file mode 100755 index 0000000..caa02b9 --- /dev/null +++ b/External-switch/etc/resolvconf/resolv.conf.d/base @@ -0,0 +1,2 @@ +# hosts external to fido +nameserver 8.8.8.8 diff --git a/lab.conf b/lab.conf index f936d8b..a9c1f03 100755 --- a/lab.conf +++ b/lab.conf @@ -5,7 +5,14 @@ Internet[1]=Central-router # Central-router Central-router[0]=Central-router Central-router[1]=DMZ +Central-router[2]=External # DMZ subnet DMZ-switch[0]=DMZ Squid[0]=DMZ + +# External subnet +External-switch[0]=External +Ext-Office[0]=External +Ext-DNS[0]=External +Ext-WWW[0]=External