Sena STS Series Guia do Utilizador Página 97

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 131
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 96
97
Step 3 Edit usr2/rc.user script as follows:
#!/bin/bash
#
# rc.user : Sample script file for running user programs at boot time
#
#PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Add shell command to execute from here
# Add shell command to execute from here
cp -a /usr2/inetd.conf /etc/inetd.conf
ps -ef
while killall inetd 2>/dev/null;
do sleep 1;
ps -ef
done
/usr/sbin/inetd
ps -ef
exit 0
The user may now disable the telnet service every time the system boots up.
Example 2. Run iptables rule
Step 1 Modify 'usr2/rc.user script as follows:
#!/bin/bash
#
# rc.user : Sample script file for running user programs at boot time
#
#!/bin/bash
#
# rc.user : Sample script file for running user programs at boot time
#
#PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Add shell command to execute from here
# if user wants to disable telnet service from all host
iptables -A INPUT -p tcp -s --dport 23 -j DROP
# if user wants to enable telnet service only from specific hosts(192.168.0.0 ~
192.168.0.255)
#iptables -A INPUT -p tcp -s ! 192.168.0.1/255.255.255.0 --dport 23 -j DROP
exit 0
The user may now disable the telnet service every time the system boots up.
If the user resets the STS Series to the factory defaults, /usr2/rc.user script file will be renamed to
/usr2/rc.user.old# file, and the default rc.user file will be restored.
Vista de página 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 130 131

Comentários a estes Manuais

Sem comentários