Sena STS Series Betriebsanweisung Seite 97

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 131
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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.
Seitenansicht 96
1 2 ... 92 93 94 95 96 97 98 99 100 101 102 ... 130 131

Kommentare zu diesen Handbüchern

Keine Kommentare