You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: usr/local/share/bastille/rdr.sh
+4-4
Original file line number
Diff line number
Diff line change
@@ -115,11 +115,11 @@ fi
115
115
116
116
# function: load rdr rule via pfctl
117
117
load_rdr_rule() {
118
-
( pfctl -a "rdr/${JAIL_NAME}" -Psn;
118
+
( pfctl -a "rdr/${JAIL_NAME}" -Psn2>/dev/null;
119
119
printf'%s\nrdr pass on $%s inet proto %s to port %s -> %s port %s\n'"$EXT_IF""${bastille_network_pf_ext_if}""$1""$2""$JAIL_IP""$3" ) \
120
120
| pfctl -a "rdr/${JAIL_NAME}" -f-
121
121
if [ -n"$JAIL_IP6" ];then
122
-
( pfctl -a "rdr/${JAIL_NAME}" -Psn;
122
+
( pfctl -a "rdr/${JAIL_NAME}" -Psn2>/dev/null;
123
123
printf'%s\nrdr pass on $%s inet proto %s to port %s -> %s port %s\n'"$EXT_IF""${bastille_network_pf_ext_if}""$1""$2""$JAIL_IP6""$3" ) \
124
124
| pfctl -a "rdr/${JAIL_NAME}" -f-
125
125
fi
@@ -130,11 +130,11 @@ load_rdr_log_rule() {
130
130
proto=$1;host_port=$2;jail_port=$3;
131
131
shift 3;
132
132
log=$@
133
-
( pfctl -a "rdr/${JAIL_NAME}" -Psn;
133
+
( pfctl -a "rdr/${JAIL_NAME}" -Psn2>/dev/null;
134
134
printf'%s\nrdr pass %s on $%s inet proto %s to port %s -> %s port %s\n'"$EXT_IF""$log""${bastille_network_pf_ext_if}""$proto""$host_port""$JAIL_IP""$jail_port" ) \
135
135
| pfctl -a "rdr/${JAIL_NAME}" -f-
136
136
if [ -n"$JAIL_IP6" ];then
137
-
( pfctl -a "rdr/${JAIL_NAME}" -Psn;
137
+
( pfctl -a "rdr/${JAIL_NAME}" -Psn2>/dev/null;
138
138
printf'%s\nrdr pass %s on $%s inet proto %s to port %s -> %s port %s\n'"$EXT_IF""$log""${bastille_network_pf_ext_if}""$proto""$host_port""$JAIL_IP6""$jail_port" ) \
0 commit comments