Portál AbcLinuxu, 12. května 2025 11:01
#!/bin/bash
/sbin/iptables -F
/sbin/iptables -A INPUT -p tcp --dport 9090 -j REJECT
/sbin/iptables -A INPUT -p udp --dport 9090 -j REJECT
/sbin/iptables -A INPUT -s 88.102.215.69 -j DROP #Skellet
/sbin/iptables -A INPUT -s 62.240.164.142 -j DROP #Bowling(CGS)
/sbin/iptables -A INPUT -s 94.112.25.85 -j DROP #ResS
/sbin/iptables -A INPUT -j ACCEPT
Dal jsem i do /etc/rc.local příkaz .
#!/bin/sh
/etc/firewall
Řešení dotazu:
Jak podle dané distribuce, někde je /etc/init.d/iptables a umožňují manipulaci (save, start) ... obecně by mohlo stačit iptables-restore < firewall ...
iptables-save > nejakysoubor
up /sbin/iptables-restore < /etc/iptables/nejakysoubor
V gentoo mam následující možnost ...
cat /etc/conf.d/local.start # /etc/conf.d/local.start # This is a good place to load any misc programs # on startup (use &>/dev/null to hide output) ...
/etc/rc.local
dřív, než /etc/init.d/Sxxnetworking
?
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.