newbie debian - réseaux et sécurité - Linux et OS Alternatifs
Marsh Posté le 20-05-2004 à 16:13:08
| AirbaT a écrit : #/etc/init.d/mon_service restart  | 
 
voir meme  
|   | 
 
Marsh Posté le 20-05-2004 à 19:29:48
montre nous le fichier de conf 
 
que donne un iptables -L 
 
contenu de /etc/host.[allow|deny] 
 
contenu de /etc/inetd.conf 
 
contenu de /etc/xinetd.d/*
Marsh Posté le 20-05-2004 à 19:34:47
| splurf a écrit : montre nous le fichier de conf  | 
 
Si avec totu ca t'arrive pas a hacker son FTP 
Marsh Posté le 20-05-2004 à 19:42:02
ReplyMarsh Posté le 20-05-2004 à 21:09:10
hosts.allow : 
 
# /etc/hosts.allow: list of hosts that are allowed to access the system. 
#                   See the manual pages hosts_access(5), hosts_options(5) 
#                   and /usr/doc/netbase/portmapper.txt.gz 
# 
# Example:    ALL: LOCAL @some_netgroup 
#             ALL: .foobar.edu EXCEPT terminalserver.foobar.edu 
# 
# If you're going to protect the portmapper use the name "portmap" for the 
# daemon name. Remember that you can only use the keyword "ALL" and IP 
# addresses (NOT host or domain names) for the portmapper. See portmap(8) 
# and /usr/doc/portmap/portmapper.txt.gz for further information. 
# 
 
 
hosts.deny : 
 
# /etc/hosts.deny: list of hosts that are _not_ allowed to access the system. 
#                  See the manual pages hosts_access(5), hosts_options(5) 
#                  and /usr/doc/netbase/portmapper.txt.gz 
# 
# Example:    ALL: some.host.name, .some.domain 
#             ALL EXCEPT in.fingerd: other.host.name, .other.domain 
# 
# If you're going to protect the portmapper use the name "portmap" for the 
# daemon name. Remember that you can only use the keyword "ALL" and IP 
# addresses (NOT host or domain names) for the portmapper. See portmap(8) 
# and /usr/doc/portmap/portmapper.txt.gz for further information. 
# 
# The PARANOID wildcard matches any host whose name does not match its 
# address. You may wish to enable this to ensure any programs that don't 
# validate looked up hostnames still leave understandable logs. In past 
# versions of Debian this has been the default. 
# ALL: PARANOID 
  
 
inetd.conf : 
 
# /etc/inetd.conf:  see inetd(8) for further informations. 
# 
# Internet server configuration database 
# 
# 
# Lines starting with "#:LABEL:" or "#<off>#" should not 
# be changed unless you know what you are doing! 
# 
# If you want to disable an entry so it isn't touched during 
# package updates just comment it out with a single '#' character. 
# 
# Packages should modify this file by using update-inetd(8) 
# 
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> 
# 
#:INTERNAL: Internal services 
#echo  stream	tcp	nowait	root	internal 
#echo  dgram	udp	wait	root	internal 
#chargen	stream	tcp	nowait	root	internal 
#chargen	dgram	udp	wait	root	internal 
discard  stream	tcp	nowait	root	internal 
discard  dgram	udp	wait	root	internal 
daytime  stream	tcp	nowait	root	internal 
#daytime	dgram	udp	wait	root	internal 
time  stream	tcp	nowait	root	internal 
#time  dgram	udp	wait	root	internal 
 
#:STANDARD: These are standard services. 
telnet  stream	tcp	nowait	telnetd.telnetd	/usr/sbin/tcpd	/usr/sbin/in.telnetd 
#<disabled>#ftp  stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/vsftpd 
 
#:BSD: Shell, login, exec and talk are BSD protocols. 
talk  dgram	udp	wait	nobody.tty	/usr/sbin/in.talkd	in.talkd 
ntalk  dgram	udp	wait	nobody.tty	/usr/sbin/in.ntalkd	in.ntalkd 
 
#:MAIL: Mail, news and uucp services. 
smtp  stream	tcp	nowait	mail	/usr/sbin/exim exim -bs 
pop-3  stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/in.qpopper -f /etc/qpopper.conf 
imap2  stream  tcp     nowait        root    /usr/sbin/tcpd  /usr/sbin/imapd 
imap3  stream  tcp     nowait        root    /usr/sbin/tcpd  /usr/sbin/imapd 
 
#:INFO: Info services 
ident  stream	tcp	wait	identd	/usr/sbin/identd	identd 
finger  stream	tcp	nowait	nobody	/usr/sbin/tcpd	/usr/sbin/in.fingerd 
 
#:BOOT: Tftp service is provided primarily for booting.  Most sites 
# run this only on machines acting as "boot servers." 
 
#:RPC: RPC based services 
 
#:HAM-RADIO: amateur-radio services 
 
#:OTHER: Other services 
xtel            stream  tcp     nowait  root    /usr/sbin/tcpd /usr/sbin/xteld 
netbios-ns	dgram	udp	wait	root  /usr/sbin/tcpd	/usr/sbin/nmbd -a 
netbios-ssn	stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/smbd 
#<off># swat  stream	tcp	nowait.400	root	/usr/sbin/tcpd	/usr/sbin/swat 
vboxd	stream	tcp	nowait	root	/usr/sbin/tcpd	/usr/sbin/vboxd 
 
 
iptables -L : 
 
Bon, là j'arrive pas à redirectionner le résultat vers un fichier ou à faire des copies d'écran, j'ai + l'abitude de Red hat mais en gros il me dit: 
iptables v1.2.6a: can't initialize iptables table 'filter' : iptables who? 
 
 
Mais je ne pense pas que ca vienne de iptables parce que j'arrive à accèdé au serveur via telnet et smb (samba) et en plus je n'y es pas touché . 
Marsh Posté le 20-05-2004 à 21:17:20
![[:wam] [:wam]](https://forum-images.hardware.fr/images/perso/wam.gif) 
 
 
On aurait aussi besoin du mot de passe du root pour etre bien sur  
 
 
 
Et apres on vas nous raconter que Linux est "secure"
Marsh Posté le 20-05-2004 à 21:18:40
| Ciler a écrit : 
 | 
 
 
Toi t'as envie que je sorte mon fioul de combat...
Marsh Posté le 20-05-2004 à 21:25:39
| AirbaT a écrit : Toi t'as envie que je sorte mon fioul de combat...  | 
 
Ben avec un utilisateur qui balance toute sa conf reseau, c'est a peu pres aussi secure qu'un mur en papier japonais 
Marsh Posté le 21-05-2004 à 11:24:59
vsftpd.conf : 
 
# Example config file /etc/vsftpd.conf 
# 
# The default compiled in settings are very paranoid. This sample file 
# loosens things up a bit, to make the ftp daemon more usable. 
# 
# Allow anonymous FTP? 
anonymous_enable=YES 
# 
# Uncomment this to allow local users to log in. 
local_enable=YES 
# 
# Uncomment this to enable any form of FTP write command. 
#write_enable=YES 
# 
# Default umask for local users is 077. You may wish to change this to 022, 
# if your users expect that (022 is used by most other ftpd's) 
#local_umask=022 
# 
# Uncomment this to allow the anonymous FTP user to upload files. This only 
# has an effect if the above global write enable is activated. Also, you will 
# obviously need to create a directory writable by the FTP user. 
#anon_upload_enable=YES 
# 
# Uncomment this if you want the anonymous FTP user to be able to create 
# new directories. 
#anon_mkdir_write_enable=YES 
# 
# Activate directory messages - messages given to remote users when they 
# go into a certain directory. 
dirmessage_enable=YES 
# 
# Activate logging of uploads/downloads. 
xferlog_enable=YES 
# 
# Make sure PORT transfer connections originate from port 20 (ftp-data). 
connect_from_port_20=YES 
# 
# If you want, you can arrange for uploaded anonymous files to be owned by 
# a different user. Note! Using "root" for uploaded files is not 
# recommended! 
#chown_uploads=YES 
#chown_username=whoever 
# 
# You may override where the log file goes if you like. The default is shown 
# below. 
xferlog_file=/var/log/vsftpd.log 
# 
# If you want, you can have your log file in standard ftpd xferlog format 
xferlog_std_format=YES 
# 
# You may change the default value for timing out an idle session. 
idle_session_timeout=600 
# 
# You may change the default value for timing out a data connection. 
data_connection_timeout=120 
# 
# It is recommended that you define on your system a unique user which the 
# ftp server can use as a totally isolated and unprivileged user. 
#nopriv_user=ftpsecure 
# 
# Enable this and the server will recognise asynchronous ABOR requests. Not 
# recommended for security (the code is non-trivial). Not enabling it, 
# however, may confuse older FTP clients. 
#async_abor_enable=YES 
# 
# By default the server will pretend to allow ASCII mode but in fact ignore 
# the request. Turn on the below options to have the server actually do ASCII 
# mangling on files when in ASCII mode. 
# Beware that turning on ascii_download_enable enables malicious remote parties 
# to consume your I/O resources, by issuing the command "SIZE /big/file" in 
# ASCII mode. 
# These ASCII options are split into upload and download because you may wish 
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), 
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be 
# on the client anyway.. 
#ascii_upload_enable=YES 
#ascii_download_enable=YES 
# 
# You may fully customise the login banner string: 
ftpd_banner=Welcome to blah FTP service. 
# 
# You may specify a file of disallowed anonymous e-mail addresses. Apparently 
# useful for combatting certain DoS attacks. 
#deny_email_enable=YES 
# (default follows) 
#banned_email_file=/etc/vsftpd.banned_emails 
# 
# You may specify an explicit list of local users to chroot() to their home 
# directory. If chroot_local_user is YES, then this list becomes a list of 
# users to NOT chroot(). 
#chroot_list_enable=YES 
# (default follows) 
#chroot_list_file=/etc/vsftpd.chroot_list 
# 
# You may activate the "-R" option to the builtin ls. This is disabled by 
# default to avoid remote users being able to cause excessive I/O on large 
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume 
# the presence of the "-R" option, so there is a strong case for enabling it. 
#ls_recurse_enable=YES 
 
si vous voulez je peux vous donner mon mdp root ca crain rien je suis sur le réseau local avec un vlan et une adresse de test différent des utilisateurs.
Marsh Posté le 21-05-2004 à 12:30:12
c dur quand meme d'utiliser une debian, mieux vaut une mandrake
Marsh Posté le 21-05-2004 à 12:43:56
Moi je dit c'est pas mal de tester 3 ou 4 distribution de linux, on sais jamais, il y a quelque chose de bien dans chaque distribution. Perso, je me suis mis sous debian déja pour tester, parce qu'on m'a dit qu'elle était faite pour les puristes et en plus je préfère les lignes des commandes aux clic. 
 
netstat -an: 
 
Active Internet connections (servers and established) 
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 0.0.0.0:8081            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:1024            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:20012           0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:1313            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:79              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:113             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:220             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:23              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:37              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:13              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:9               0.0.0.0:*               LISTEN       
tcp        0      0 192.168.1.1:53          0.0.0.0:*               LISTEN       
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN       
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN       
udp        0      0 127.0.0.1:1034          127.0.0.1:1034          ESTABLISHED  
udp        0      0 0.0.0.0:1032            0.0.0.0:*                            
udp        0      0 0.0.0.0:137             0.0.0.0:*                            
udp        0      0 0.0.0.0:518             0.0.0.0:*                            
udp        0      0 0.0.0.0:517             0.0.0.0:*                            
udp        0      0 0.0.0.0:9               0.0.0.0:*                            
udp        0    384 0.0.0.0:1025            0.0.0.0:*                            
udp        0      0 192.168.1.1:53          0.0.0.0:*                            
udp        0      0 127.0.0.1:53            0.0.0.0:*                            
udp        0      0 127.0.0.1:921           0.0.0.0:*                            
udp        0      0 0.0.0.0:1024            0.0.0.0:*                            
udp        0      0 0.0.0.0:111             0.0.0.0:*                            
raw        0      0 0.0.0.0:1               0.0.0.0:*               7            
raw        0      0 0.0.0.0:6               0.0.0.0:*               7            
Active UNIX domain sockets (servers and established) 
Proto RefCnt Flags       Type       State         I-Node Path 
unix  0      [ ACC ]     STREAM     LISTENING     303    /var/run/postgresql/.s.PGSQL.5432 
unix  0      [ ACC ]     STREAM     LISTENING     348    /tmp/.font-unix/fs7100 
unix  8      [ ]         DGRAM                    79     /dev/log 
unix  0      [ ACC ]     STREAM     LISTENING     249    /dev/printer 
unix  0      [ ]         DGRAM                    357     
unix  0      [ ]         DGRAM                    343     
unix  0      [ ]         DGRAM                    245     
unix  0      [ ]         DGRAM                    232     
unix  0      [ ]         DGRAM                    122     
unix  0      [ ]         DGRAM                    90      
unix  0      [ ]         DGRAM                    86      
unix  0      [ ]         DGRAM                    84      
Marsh Posté le 21-05-2004 à 12:52:51
Es tu sur que ton serveur ftp est lancé via inetd?  Car ton xinetd.conf ne l'active pas => #<disabled>#ftp  stream tcp nowait root /usr/sbin/tcpd /usr/sbin/vsftpd  
Marsh Posté le 21-05-2004 à 13:02:33
oui, lorsque j'ai faire l'install du package, il m'a demander si je voulais le démarrer avec inetd ou en tand que démon, j'ai mis "inetd". 
Mais, il ni as pas une commande comme sous Red hat qui dit si le service est démarrer ou pas: services vsftpd status.
Marsh Posté le 21-05-2004 à 18:15:26
j'aurai juste a changer cette ligne là : 
#<disabled>#ftp  stream tcp nowait root /usr/sbin/tcpd /usr/sbin/vsftpd  
en : 
ftp  stream tcp nowait root /usr/sbin/tcpd /usr/sbin/vsftpd  
 
pour qu'il démarre?
Marsh Posté le 21-05-2004 à 19:04:50
Le message d'erreur est maintenant le suivant que se soit en anonymous ou avec un login local : 
 
500 OOPS: vsftpd: cannot locate user specified in 'tunable_ftp_username' 
Failed to receive response after connect 
Host type (1): Automatic detect 
 
mais j'ai même pas de liste de user valide ou 1 truc dans le genre 
Marsh Posté le 21-05-2004 à 20:48:55
mais il y a du changement au niveau netstat 
 
Active Internet connections (servers and established) 
Proto Recv-Q Send-Q Local Address           Foreign Address         State       
tcp        0      0 192.168.1.1:139         192.168.1.10:1201       ESTABLISHED  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:515             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:1024            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:1313            0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:113             0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:37              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:13              0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:9               0.0.0.0:*               LISTEN       
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN       
udp        0      0 127.0.0.1:1025          0.0.0.0:*                            
udp        0      0 192.168.1.1:138         0.0.0.0:*                            
udp        0      0 192.168.1.1:137         0.0.0.0:*                            
udp        0      0 0.0.0.0:138             0.0.0.0:*                            
udp        0      0 0.0.0.0:137             0.0.0.0:*                            
udp        0      0 0.0.0.0:1024            0.0.0.0:*                            
udp        0      0 0.0.0.0:9               0.0.0.0:*                            
udp        0      0 0.0.0.0:764             0.0.0.0:*                            
udp        0      0 0.0.0.0:111             0.0.0.0:*                            
raw        0      0 0.0.0.0:1               0.0.0.0:*               7            
raw        0      0 0.0.0.0:6               0.0.0.0:*               7            
Active UNIX domain sockets (servers and established) 
Proto RefCnt Flags       Type       State         I-Node Path 
unix  2      [ ]         DGRAM                    76     /dev/log 
unix  0      [ ACC ]     STREAM     LISTENING     121    /dev/printer 
unix  0      [ ]         DGRAM                    110     
unix  0      [ ]         DGRAM                    81      
Marsh Posté le 23-05-2004 à 20:44:51
En faite, j'ai utilisé "Dselect" pour installer vsftpd, il m'a en même temps installé ssh et aprés ca à marché. Une mauvaise gestion des dépenses avec "apt".  
 
Le problème maintenant c'est que je suit obliger d'utiliser sftp au lieu de ftp, Internet explorer et dos sont trés limité de se côté.  
 
Y a il un moyen de repasser en ftp, supprimer ssh avec ftp, ... un truc dans le genre en agissant sur le serveur? 
Marsh Posté le 23-05-2004 à 21:54:50
en faite cette commande va me supprimer vsftpd et va n'installer proftpd, c'est ca ? 
 
Je vai matter ca.
Marsh Posté le 24-05-2004 à 21:25:07
donc c'est bon, ca fonctionne top  
 
P'tit question sur Protfpd, c'est souvent on parle de virtualhost, c'est quoi ?  
j'arrive pas à m'imaginer qu'es que c'est, pourtant j'ai déja utiliser le terme sous apache mais là .....plom plom plom. 
 
En tout cas, merci à tous ceux qui m'ont aidé et surtout à splurf .
Marsh Posté le 24-05-2004 à 22:22:28
c pareil que sous apache en fait sauf que c'est pour le ftp
Marsh Posté le 20-05-2004 à 15:01:56
Salut à tous,
- Comment fait ton pour rédémarrer un service sous debian c'est a dire a faire prendre en compte les changements apporter à un fichier de configuration ?
- J'essaie de crée un serveur ftp et malheureursement ca ne marche pas, il me bloque à l'entré comme si il y avait un firewall. il me semble que j'ai tout fait correct,
apt-get install vsftpd
reboot
vi vsftpd.conf (la conf est bonne, car je quasiment la même sous Red hat)
Quelqu'un aurair une idée?