Skip to content

Commit

Permalink
Added firewall rules to reject outgoing and incoming packets between …
Browse files Browse the repository at this point in the history
…External subnet and LDAP
  • Loading branch information
iArcanic committed Jul 20, 2023
1 parent 9f3c13b commit c0c5a3c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Central-router.startup
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,13 @@ iptables -A FORWARD -i eth3 -o eth1 -s 10.0.3.0/24 -d 10.0.1.0/24 -p icmp --icmp
iptables -A FORWARD -i eth4 -o eth1 -s 10.0.4.0/24 -d 10.0.1.0/24 -p icmp --icmp-type 8 -j DROP
iptables -A FORWARD -i eth5 -o eth1 -s 10.0.5.0/24 -d 10.0.1.0/24 -p icmp --icmp-type 8 -j DROP
iptables -A FORWARD -i eth6 -o eth1 -s 10.0.6.0/24 -d 10.0.1.0/24 -p icmp --icmp-type 8 -j DROP

# Allow incoming ICMP Echo Request (ping) from External subnet to specific machines in Server subnet
iptables -A FORWARD -s 10.0.2.0/24 -d 10.0.5.2 -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.0.2.0/24 -d 10.0.5.4 -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED -j ACCEPT

# Drop incoming ICMP Echo Request (ping) from External to LDAP (for all other machines in External subnet)
iptables -A FORWARD -s 10.0.2.0/24 -d 10.0.5.3 -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED -j DROP

# Drop incoming ICMP Echo Request (ping) from LDAP to External subnet
iptables -A FORWARD -s 10.0.5.3 -d 10.0.2.0/24 -p icmp --icmp-type 8 -m state --state NEW,ESTABLISHED -j DROP

0 comments on commit c0c5a3c

Please sign in to comment.