2015-09-19 21:31:54 +02:00
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# Shorewall -- /usr/share/shorewall/action.GlusterFS
|
2015-09-19 21:31:54 +02:00
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# GlusterFS Handler for GlusterFS 3.4 and Later
|
2015-09-19 21:31:54 +02:00
|
|
|
#
|
|
|
|
# Parameters:
|
|
|
|
#
|
2016-04-05 19:13:55 +02:00
|
|
|
# Bricks - Number of bricks
|
|
|
|
# IB - 0 or 1, indicating whether Infiniband is used or not
|
|
|
|
#
|
|
|
|
###############################################################################
|
2015-09-19 21:31:54 +02:00
|
|
|
|
|
|
|
DEFAULTS 2,0
|
|
|
|
|
2016-03-12 21:15:07 +01:00
|
|
|
?if @1 !~ /^\d+/ || ! @1 || @1 > 1024
|
2016-03-15 20:06:32 +01:00
|
|
|
?error Invalid value for Bricks (@1)
|
2016-03-12 21:15:07 +01:00
|
|
|
?elsif @2 !~ /^[01]$/
|
2016-03-15 20:06:32 +01:00
|
|
|
?error Invalid value for IB (@2)
|
2016-03-12 21:15:07 +01:00
|
|
|
?endif
|
2015-09-19 21:31:54 +02:00
|
|
|
|
2016-04-05 19:13:55 +02:00
|
|
|
#ACTION SOURCE DEST PROTO DPORT
|
|
|
|
|
2015-09-19 21:31:54 +02:00
|
|
|
ACCEPT - - udp 111,2049
|
|
|
|
ACCEPT - - tcp 38465:38467
|
|
|
|
|
|
|
|
?if @{2}
|
|
|
|
ACCEPT - - tcp 24007:24008
|
|
|
|
?else
|
|
|
|
ACCEPT - - tcp 24007
|
|
|
|
?endif
|
|
|
|
|
|
|
|
?set last_port 49150 + @{1}
|
|
|
|
|
|
|
|
ACCEPT - - tcp 49151:$last_port
|