Skip to content

Commit

Permalink
Merge pull request #10 from iArcanic/External-subnet
Browse files Browse the repository at this point in the history
External-subnet
  • Loading branch information
iArcanic authored Jul 14, 2023
2 parents 1e642ec + 2fa6d23 commit 784a1b0
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Central-router.startup
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions Ext-DNS.startup
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions Ext-DNS/etc/dnsmasq.conf
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Ext-DNS/etc/dnsmasq_static_hosts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
201.224.19.7 this.test.com
201.224.19.7 faceybooky.com
2 changes: 2 additions & 0 deletions Ext-DNS/etc/resolvconf/resolv.conf.d/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# hosts external to fido
nameserver 8.8.8.8
6 changes: 6 additions & 0 deletions Ext-Office.startup
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Ext-Office/etc/resolvconf/resolv.conf.d/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# hosts external to fido
nameserver 8.8.8.8
11 changes: 11 additions & 0 deletions Ext-WWW.startup
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions Ext-WWW/etc/resolvconf/resolv.conf.d/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# hosts external to fido
nameserver 8.8.8.8
8 changes: 8 additions & 0 deletions Ext-WWW/var/www/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
</head>
<body>
<p> This is the EXT-WWW Internal Webserver </p>
<p> You are now connected to an EXTERNAL host! </p>
</body>
</html>
6 changes: 6 additions & 0 deletions External-switch.startup
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions External-switch/etc/resolvconf/resolv.conf.d/base
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# hosts external to fido
nameserver 8.8.8.8
7 changes: 7 additions & 0 deletions lab.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 784a1b0

Please sign in to comment.