mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-24 18:03:06 +02:00
Merge branch 'master' into next
Conflicts: config/rootfiles/core/40/filelists/files make.sh
This commit is contained in:
@@ -140,6 +140,8 @@ case "$1" in
|
||||
# CUSTOM chains, can be used by the users themselves
|
||||
/sbin/iptables -N CUSTOMINPUT
|
||||
/sbin/iptables -A INPUT -j CUSTOMINPUT
|
||||
/sbin/iptables -N GUARDIANINPUT
|
||||
/sbin/iptables -A INPUT -j GUARDIANINPUT
|
||||
/sbin/iptables -N CUSTOMFORWARD
|
||||
/sbin/iptables -A FORWARD -j CUSTOMFORWARD
|
||||
/sbin/iptables -N CUSTOMOUTPUT
|
||||
|
||||
54
src/initscripts/init.d/imspector
Normal file
54
src/initscripts/init.d/imspector
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/bin/sh
|
||||
# Begin $rc_base/init.d/imspector
|
||||
|
||||
. /etc/sysconfig/rc
|
||||
. $rc_functions
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
boot_mesg "Inserting imspector redirects..."
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 1863 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 5222 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 5223 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 5190 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 5050 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 6667 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -A CUSTOMPREROUTING -p tcp --destination-port 8074 -j REDIRECT --to-ports 16667
|
||||
|
||||
boot_mesg "Starting imspector Deamon..."
|
||||
loadproc imspector -c /etc/imspector/imspector.conf
|
||||
evaluate_retval
|
||||
;;
|
||||
|
||||
stop)
|
||||
boot_mesg "Stopping imspector Deamon..."
|
||||
killproc /usr/sbin/imspector
|
||||
evaluate_retval
|
||||
|
||||
boot_mesg "Remove imspector redirects..."
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 1863 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 5222 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 5223 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 5190 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 5050 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 6667 -j REDIRECT --to-ports 16667
|
||||
iptables -t nat -D CUSTOMPREROUTING -p tcp --destination-port 8074 -j REDIRECT --to-ports 16667
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
status)
|
||||
statusproc /usr/sbin/imspector
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# End $rc_base/init.d/imspector
|
||||
@@ -30,6 +30,7 @@ case "${1}" in
|
||||
evaluate_retval
|
||||
if ! grep -q "35700:35700" /var/ipfire/xtaccess/config ; then
|
||||
echo "tcp,0.0.0.0/0,35700:35700,on,0.0.0.0,IPFireSeeder" >> /var/ipfire/xtaccess/config
|
||||
echo "udp,0.0.0.0/0,35700:35700,on,0.0.0.0,IPFireSeeder" >> /var/ipfire/xtaccess/config
|
||||
/usr/local/bin/setxtaccess
|
||||
fi
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user