From 4dab8220da1ee6d1ec6fd12033ee0648a90086b2 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:02:02 +0100 Subject: [PATCH 01/14] Initial commit --- External-switch.startup | 0 External-switch/etc/resolvconf/resolv.conf.d/base | 2 ++ 2 files changed, 2 insertions(+) create mode 100755 External-switch.startup create mode 100755 External-switch/etc/resolvconf/resolv.conf.d/base diff --git a/External-switch.startup b/External-switch.startup new file mode 100755 index 0000000..e69de29 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 From 373209deade7e4325e8e7adf25099340cba6701c Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:08:20 +0100 Subject: [PATCH 02/14] Added config for External-switch machine --- External-switch.startup | 3 +++ lab.conf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/External-switch.startup b/External-switch.startup index e69de29..b9a8847 100755 --- a/External-switch.startup +++ b/External-switch.startup @@ -0,0 +1,3 @@ +# IP of External-switch +ip addr add 10.0.2.2/24 dev eth0 +ip link set up dev eth0 diff --git a/lab.conf b/lab.conf index f936d8b..217c526 100755 --- a/lab.conf +++ b/lab.conf @@ -9,3 +9,6 @@ Central-router[1]=DMZ # DMZ subnet DMZ-switch[0]=DMZ Squid[0]=DMZ + +# External subnet +External-switch[0]=External From ece89d459dea342d1617410dc2425bbb5cf65fd5 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:17:47 +0100 Subject: [PATCH 03/14] Added connection between External-switch and Central-router via gateway IP --- Central-router.startup | 4 ++++ External-switch.startup | 3 +++ lab.conf | 1 + 3 files changed, 8 insertions(+) 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/External-switch.startup b/External-switch.startup index b9a8847..ef4858a 100755 --- a/External-switch.startup +++ b/External-switch.startup @@ -1,3 +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/lab.conf b/lab.conf index 217c526..039176a 100755 --- a/lab.conf +++ b/lab.conf @@ -5,6 +5,7 @@ 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 From c2b695d80c47702f363454e17453b80ad15944b8 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:24:51 +0100 Subject: [PATCH 04/14] Initial commit --- Ext-Office.startup | 0 Ext-Office/etc/resolvconf/resolv.conf.d/base | 2 ++ 2 files changed, 2 insertions(+) create mode 100755 Ext-Office.startup create mode 100755 Ext-Office/etc/resolvconf/resolv.conf.d/base diff --git a/Ext-Office.startup b/Ext-Office.startup new file mode 100755 index 0000000..e69de29 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 From 7bfa18764810d0119662b4c212fbbc38654bc6e4 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:30:30 +0100 Subject: [PATCH 05/14] Added config for Ext-Office machine --- Ext-Office.startup | 3 +++ lab.conf | 1 + 2 files changed, 4 insertions(+) diff --git a/Ext-Office.startup b/Ext-Office.startup index e69de29..68f25aa 100755 --- a/Ext-Office.startup +++ b/Ext-Office.startup @@ -0,0 +1,3 @@ +# IP of Ext-Office +ip addr add 10.0.2.3/24 dev eth0 +ip link set up dev eth0 diff --git a/lab.conf b/lab.conf index 039176a..0a86ad9 100755 --- a/lab.conf +++ b/lab.conf @@ -13,3 +13,4 @@ Squid[0]=DMZ # External subnet External-switch[0]=External +Ext-Office[0]=External From 0d1cb96facae542829653594d91c875ae74d0901 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:40:00 +0100 Subject: [PATCH 06/14] Added connection between Ext-Office and External-switch via gateway IP --- Ext-Office.startup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ext-Office.startup b/Ext-Office.startup index 68f25aa..3af4a8d 100755 --- a/Ext-Office.startup +++ b/Ext-Office.startup @@ -1,3 +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 From 8f9770994062465362fd7a7be1113bbe344141d7 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:52:15 +0100 Subject: [PATCH 07/14] Initial commit --- Ext-DNS.startup | 0 Ext-DNS/etc/dnsmasq.conf | 10 ++++++++++ Ext-DNS/etc/dnsmasq_static_hosts.conf | 2 ++ Ext-DNS/etc/resolvconf/resolv.conf.d/base | 2 ++ 4 files changed, 14 insertions(+) create mode 100755 Ext-DNS.startup create mode 100755 Ext-DNS/etc/dnsmasq.conf create mode 100755 Ext-DNS/etc/dnsmasq_static_hosts.conf create mode 100755 Ext-DNS/etc/resolvconf/resolv.conf.d/base diff --git a/Ext-DNS.startup b/Ext-DNS.startup new file mode 100755 index 0000000..e69de29 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 From c0e5d87a7f174fd21792646a79c65e6dc89a25d2 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 11:58:26 +0100 Subject: [PATCH 08/14] Added config for Ext-DNS machine --- Ext-DNS.startup | 3 +++ lab.conf | 1 + 2 files changed, 4 insertions(+) diff --git a/Ext-DNS.startup b/Ext-DNS.startup index e69de29..4e0d00b 100755 --- a/Ext-DNS.startup +++ b/Ext-DNS.startup @@ -0,0 +1,3 @@ +# IP of Ext-DNS +ip addr add 10.0.2.4/24 dev eth0 +ip link set up dev eth0 diff --git a/lab.conf b/lab.conf index 0a86ad9..ce6b9e1 100755 --- a/lab.conf +++ b/lab.conf @@ -14,3 +14,4 @@ Squid[0]=DMZ # External subnet External-switch[0]=External Ext-Office[0]=External +Ext-DNS[0]=External From 8c3eb12b3916c7f597f2a87a1d728ce9282bca34 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 12:05:14 +0100 Subject: [PATCH 09/14] Added connection between Ext-DNS and External-switch via gateway IP --- Ext-DNS.startup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ext-DNS.startup b/Ext-DNS.startup index 4e0d00b..c1b8ecc 100755 --- a/Ext-DNS.startup +++ b/Ext-DNS.startup @@ -1,3 +1,6 @@ # 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 From b62ba2f28acf5bbe3b0cd26d5fba450cc76a4b1b Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 12:10:33 +0100 Subject: [PATCH 10/14] Added commands to start DNS service --- Ext-DNS.startup | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Ext-DNS.startup b/Ext-DNS.startup index c1b8ecc..dcd3d44 100755 --- a/Ext-DNS.startup +++ b/Ext-DNS.startup @@ -4,3 +4,7 @@ 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 From 816130963cafe0da01adc7f1049bdd45b3533370 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 12:19:04 +0100 Subject: [PATCH 11/14] Initial commit --- Ext-WWW.startup | 0 Ext-WWW/etc/resolvconf/resolv.conf.d/base | 2 ++ Ext-WWW/var/www/index.html | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100755 Ext-WWW.startup create mode 100755 Ext-WWW/etc/resolvconf/resolv.conf.d/base create mode 100644 Ext-WWW/var/www/index.html diff --git a/Ext-WWW.startup b/Ext-WWW.startup new file mode 100755 index 0000000..e69de29 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!

+ + From 94e1c78a516e402ce04951ba48f27f81d31271f5 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 12:26:14 +0100 Subject: [PATCH 12/14] Added config for Ext-WWW machine --- Ext-WWW.startup | 3 +++ lab.conf | 1 + 2 files changed, 4 insertions(+) diff --git a/Ext-WWW.startup b/Ext-WWW.startup index e69de29..ec4257d 100755 --- a/Ext-WWW.startup +++ b/Ext-WWW.startup @@ -0,0 +1,3 @@ +# IP of Ext-WWW +ip addr add 10.0.2.5/24 dev eth0 +ip link set up dev eth0 diff --git a/lab.conf b/lab.conf index ce6b9e1..a9c1f03 100755 --- a/lab.conf +++ b/lab.conf @@ -15,3 +15,4 @@ Squid[0]=DMZ External-switch[0]=External Ext-Office[0]=External Ext-DNS[0]=External +Ext-WWW[0]=External From 97cb8ff48e612c2e5342115e28023b08e5910e62 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 12:39:44 +0100 Subject: [PATCH 13/14] Added connection between Ext-WWW and External-switch via gateway IP --- Ext-WWW.startup | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ext-WWW.startup b/Ext-WWW.startup index ec4257d..7c3d415 100755 --- a/Ext-WWW.startup +++ b/Ext-WWW.startup @@ -1,3 +1,6 @@ # 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 From 45c50bf0da70ff50d88d382a93fa1f3ae781d676 Mon Sep 17 00:00:00 2001 From: Preetham Ananthkumar Date: Fri, 14 Jul 2023 12:45:29 +0100 Subject: [PATCH 14/14] Added commands to start apache2 web server --- Ext-WWW.startup | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ext-WWW.startup b/Ext-WWW.startup index 7c3d415..3e611c6 100755 --- a/Ext-WWW.startup +++ b/Ext-WWW.startup @@ -4,3 +4,8 @@ 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