I would like to switch from iptables
to Brocade/Vyatta
, but are having trouble with "converting" firewall rules.
This is my iptables, which works:
# Default policy to drop 'everything' but our output to internet
iptables -P FORWARD DROP
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
# Allow established connections (the responses to our outgoing traffic)
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Allow local programs that use loopback (Unix sockets)
iptables -A INPUT -s 127.0.0.0/8 -d 127.0.0.0/8 -i lo -j ACCEPT
# Allow traffic between VLAN servers
iptables -A INPUT -s 89.55.42.0/28 -j ACCEPT
# Allow SSH
#iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
# Allow ICMP for monitoring
iptables -A INPUT -p icmp -j ACCEPT
And this is my try on Brocade/Vyatta:
set security firewall name VLAN-200-IN default-action 'drop'
set security firewall name VLAN-200-IN rule 10 action 'accept'
set security firewall name VLAN-200-IN rule 10 source address '89.55.42.0/28'
set security firewall name VLAN-200-IN rule 20 action 'accept'
set security firewall name VLAN-200-IN rule 20 destination port '22'
set security firewall name VLAN-200-IN rule 20 protocol 'tcp'
set security firewall name VLAN-200-IN rule 30 action 'accept'
set security firewall name VLAN-200-IN rule 30 protocol 'icmp'
set security firewall name VLAN-200-OUT default-action 'accept'
Which is attached to my VLAN/VIF:
interfaces {
bonding dp0bond1 {
address 77.51.23.1/23
mode lacp
vif 200 {
address 89.55.42.0/28
firewall {
in VLAN-200-IN
out VLAN-200-OUT
}
}
vrrp {
vrrp-group 2 {
...
}
}
}
...
I'm testing and want to protect the VLAN 200, but with my example I'm still able to send packets via SIP port 5060 through to servers behind the gateway. What have I misunderstood?