Skip to content

Commit

Permalink
Merge pull request #5 from iArcanic/DMZ-subnet
Browse files Browse the repository at this point in the history
DMZ-subnet
  • Loading branch information
iArcanic authored Jul 13, 2023
2 parents 2b66610 + 7c3155f commit 1e642ec
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Central-router.startup
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
ip addr add 192.168.0.2/24 dev eth0
ip link set up dev eth0

# Gateway IP
# Gateway IP to Internet
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
6 changes: 6 additions & 0 deletions DMZ-switch.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# IP of DMZ-switch
ip addr add 10.0.1.2/24 dev eth0
ip link set up dev eth0

# Gateway IP to Central-router
ip route add default via 10.0.1.1 dev eth0
2 changes: 2 additions & 0 deletions DMZ-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
11 changes: 11 additions & 0 deletions Squid.startup
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# IP of Squid
ip addr add 10.0.1.3/24 dev eth0
ip link set up dev eth0

# Route to DMZ-switch
ip route add default via 10.0.1.2 dev eth0

# Start Squid service
touch /var/log/squid/access.log
chmod 777 /var/log/squid/access.log
systemctl start squid.service
2 changes: 2 additions & 0 deletions Squid/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
5 changes: 5 additions & 0 deletions Squid/etc/squid/squid.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
acl all src all
http_access allow all
http_port 3128 transparent
http_port 3129
access_log /var/log/squid/access.log
7 changes: 7 additions & 0 deletions lab.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Internet
Internet[0]=Internet
Internet[1]=Central-router

# Central-router
Central-router[0]=Central-router
Central-router[1]=DMZ

# DMZ subnet
DMZ-switch[0]=DMZ
Squid[0]=DMZ

0 comments on commit 1e642ec

Please sign in to comment.