File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -124,6 +124,14 @@ accept_dst_ip_port() {
124124 -m comment --comment " $comment "
125125}
126126
127+ drop_dst_ip () {
128+ chain=" $1 "
129+ ip=" $2 "
130+ comment=" $3 "
131+
132+ iptables -A " $chain " -d " $ip " -j DROP \
133+ -m comment --comment " $comment "
134+ }
127135
128136# ##########################################################################
129137# (5) Load firewall rules in {MAINTENANCE,PRODUCTION}_{IN,OUT} chains.
Original file line number Diff line number Diff line change @@ -84,9 +84,7 @@ accept_dst_port $CHAIN_MAINTENANCE_IN udp $EL_P2P_PORT "EL P2P (UDP)"
8484###########################################################################
8585
8686# Block Flashbots protect tx endpoints during maintenance
87- iptables -A $CHAIN_MAINTENANCE_OUT \
88- -d $FLASHBOTS_TX_STREAM_1,$FLASHBOTS_TX_STREAM_2 -j DROP \
89- -m comment --comment "Flashbots Protect (DROP before accept-all 443)"
87+ drop_dst_ip $CHAIN_MAINTENANCE_OUT $FLASHBOTS_TX_STREAM_1,$FLASHBOTS_TX_STREAM_2 "Flashbots Protect (DROP before accept-all rules)"
9088
9189accept_dst_port $CHAIN_MAINTENANCE_OUT udp $DNS_PORT "DNS (UDP)"
9290accept_dst_port $CHAIN_MAINTENANCE_OUT tcp $DNS_PORT "DNS (TCP)"
You can’t perform that action at this time.
0 commit comments