Fichero de FTP modificado
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# 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=NO
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=NO
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=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.
# Note that the default log file location is /var/log/xferlog in this case.
#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 on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#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 restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
#chroot_local_user=YES
#
# 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().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
#chroot_local_user=YES
#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
#
# Customization
#
# Some of vsftpd's settings don't fit the filesystem layout by
# default.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/private/vsftpd.pem
# Limitar el numero de usuarios que se pueden conectar al servidor ftp.
max_clients=20
# Enjaula a los usuarios dentro de su home (directorio personal).
chroot_local_user=YES
# Mensaje de bienvenida.
ftpd_banner=Bienvenidos al Servidor FTP AI4PC107!.
Si le quieres poner lista de enjaulados
#Habilitar.
chroot_list_enable=YES
#En esta lista introducimos los usuarios no enjaulados.
chroot_list_file=/etc/vsftpd.chroot_list
viernes, 13 de diciembre de 2013
miércoles, 11 de diciembre de 2013
Servidor FTP anónimo
Instalacion del vsftpd en caso de no tenerlo.
sudo apt-get install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf_original
sudo gedit /etc/vsftpd.conf
listen=YES
local_enable=NO
anonymous_enable=YES
anon_root=/srv/ftp/
Se reinicia
sudo /etc/init.d/vsftpd restart
anonymous realmente es un usuario llamado 'ftp'
Seguimos los siguientes pasos
sudo mkdir /srv/ftp/incoming
sudo chmod 755 /srv/ftp
sudo chmod 777 /srv/ftp/incoming
sudo chown root:root /srv/ftp/incoming
directorio srv del usuario ftp (no debe tener permisos de escritura, propietario root)
drwxr-xr-x root
/srv/ftp/
Directorio con permisos de escritura
drwxrwxrwx root
/srv/ftp/incoming/
Continuación de la configuración del archivo vsftpd en la sección “Anonymus FTP user Settings”:
# Anonymus FTP user Settings ##
Permitir conexiones anónimas.
anonymous_enable=YES
# Directorio raíz para los usuarios anónimos. Carpeta creada
# en /srv/ftp/ como se comentó anteriormente.
anon_root=incoming
# Solo permite descargar a los usuarios anónimos aquellos archivos
# que tengan permisos de lectura.
anon_world_readable_only=YES
# Para mi caso especifiqué con la siguiente directiva que los
# usuarios anónimos no tengan permisos para subir archivos
# al servidor.
anon_upload_enable=NO
# Esta directiva permite a los usuarios anónimos a crear carpetas
# en ciertos casos.
anon_mkdir_write_enable=NO
# Directiva que permite establecer el límite de la velocidad máxima
# de transferencia de datos para los usuarios anónimos. Fui un
# poco drástico jeje (2kb/s)
anon_max_rate=2048
http://molons.wordpress.com/2012/01/17/instalar-vsftpd-en-ubuntu-10-04-webmin-y-habilitar-usuario-anonymous/
ftp://ftp.eppg.com/
servicios_en_red
star.tr3k
Forma como me funciono el FTP Anonimo
listen=YES
local_enable=YES
anonymous_enable=YES
write_enable=YES
anon_root=/srv/ftp/
chroot_local_user=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_world_readable_only=YES
anon_upload_enable=YES
sudo apt-get install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf_original
sudo gedit /etc/vsftpd.conf
En el fichero dejarlo de esta forma
listen=YES
local_enable=NO
anonymous_enable=YES
anon_root=/srv/ftp/
Se reinicia
sudo /etc/init.d/vsftpd restart
anonymous realmente es un usuario llamado 'ftp'
Seguimos los siguientes pasos
sudo mkdir /srv/ftp/incoming
sudo chmod 755 /srv/ftp
sudo chmod 777 /srv/ftp/incoming
sudo chown root:root /srv/ftp/incoming
directorio srv del usuario ftp (no debe tener permisos de escritura, propietario root)
drwxr-xr-x root
/srv/ftp/
Directorio con permisos de escritura
drwxrwxrwx root
/srv/ftp/incoming/
Continuación de la configuración del archivo vsftpd en la sección “Anonymus FTP user Settings”:
# Anonymus FTP user Settings ##
Permitir conexiones anónimas.
anonymous_enable=YES
# Directorio raíz para los usuarios anónimos. Carpeta creada
# en /srv/ftp/ como se comentó anteriormente.
anon_root=incoming
# Solo permite descargar a los usuarios anónimos aquellos archivos
# que tengan permisos de lectura.
anon_world_readable_only=YES
# Para mi caso especifiqué con la siguiente directiva que los
# usuarios anónimos no tengan permisos para subir archivos
# al servidor.
anon_upload_enable=NO
# Esta directiva permite a los usuarios anónimos a crear carpetas
# en ciertos casos.
anon_mkdir_write_enable=NO
# Directiva que permite establecer el límite de la velocidad máxima
# de transferencia de datos para los usuarios anónimos. Fui un
# poco drástico jeje (2kb/s)
anon_max_rate=2048
http://molons.wordpress.com/
ftp://ftp.eppg.com/
servicios_en_red
star.tr3k
Forma como me funciono el FTP Anonimo
listen=YES
local_enable=YES
anonymous_enable=YES
write_enable=YES
anon_root=/srv/ftp/
chroot_local_user=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_world_readable_only=YES
anon_upload_enable=YES
Instalar y configurar servidor FTP vsftpd
Ordenes para instalar:
sudo apt-get install vsftpd
sudo gedit /etc/vsftpd.conf
sudo /etc/init.d/vsftpd start
Abajo dejo un ejemplo del fichero de configuración
# Example config file /etc/vsftpd.conf
#
#
# Allow anonymous FTP? (Disabled by default)
anonymous_enable=NO
#
# 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
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=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
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
chroot_local_user=YES
#
# 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_local_user=YES
chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.
#
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/
lunes, 9 de diciembre de 2013
Configuración y comprobación de una zona inversa
Configuración
y comprobación de una zona
inversa------------------------------
profes@AI4PC150:~$ sudo gedit /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//Zona de resolución directa
zone "aulaI4.com" {
type master;
file "/etc/bind/db.aulaI4.com";
};
//Zona de resolución inversa
zone "192.in-addr.arpa" {
type master;
file "/etc/bind/db.192";
};
profes@AI4PC149:~$ sudo gedit /etc/bind/db.192
;
; BIND resolución inversa, dominio raíz i-addr.arpa
;
$TTL 38400 ;segundos que puede estar el registro en la caché
192.in-addr.arpa. IN SOA ai4pc150.aulaI4.com. profe.aulaI4.com. (
2013102301 ; Número de serie / Serial
10800 ; Actualización / Refresh
3600 ; Tiempo de reintentos / Retry
604800 ; Caducidad / Expire
38400 ) ; Valor TTL / Negative Cache TTL
;
192.in-addr.arpa. IN NS ai4pc150.aulaI4.com.
150.1.168.192.in-addr.arpa. IN PTR ai4pc150.aulaI4.com.
150.1.168 IN PTR ai4pc150.aulaI4.com.
101.1.168 IN PTR ai4pc101.aulaI4.com.
102.1.168 IN PTR ai4pc102.aulaI4.com.
103.1.168 IN PTR ai4pc103.aulaI4.com.
104.1.168 IN PTR ai4pc104.aulaI4.com.
profes@AI4PC150:~$ named-checkzone 192.in-addr.arpa /etc/bind/db.192
zone 192.in-addr.arpa/IN: loaded serial 2013102301
OK
profes@AI4PC150:~$ sudo service bind9 restart
Configuración y comprobación de una zona inversa ------------------------------
profes@AI4PC150:~$ sudo gedit /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//Zona de resolución directa
zone "aulaI4.com" {
type master;
file "/etc/bind/db.aulaI4.com";
};
//Zona de resolución inversa versión 2
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
profes@AI4PC150:~$ sudo gedit /etc/bind/db.192.168.1
;
; BIND resolución inversa, dominio raíz in-addr.arpa
;
$TTL 38400 ;segundos que puede estar el registro en la caché
1.168.192.in-addr.arpa. IN SOA pc149.aulaSER.com. profe.aulaSER.com. (
2011100401 ; Número de serie / Serial
10800 ; Actualización / Refresh
3600 ; Tiempo de reintentos / Retry
604800 ; Caducidad / Expire
38400 ) ; Valor TTL / Negative Cache TTL
;
1.168.192.in-addr.arpa. IN NS pc149.aulaSER.com.
149.1.168.192.in-addr.arpa. INPTR pc149.aulaSER.com.
149 IN PTR pc149.aulaSER.com.
101 IN PTR ai4pc101.aulaI4.com.
102 IN PTR ai4pc102.aulaI4.com.
103 IN PTR ai4pc103.aulaI4.com.
104 IN PTR ai4pc104.aulaI4.com.
105 IN PTR ai4pc105.aulaI4.com.
106 IN PTR ai4pc106.aulaI4.com.
107 IN PTR ai4pc107.aulaI4.com.
108 IN PTR ai4pc108.aulaI4.com.
22IN PTR pcp22.aulaI4.com.
150 IN PTR pc150.aulaI4.com..
profes@AI4PC150:~$ named-checkzone 1.168.192.in-addr.arpa /etc/bind/db.192.168.1
zone 1.168.192.in-addr.arpa/IN: loaded serial 2013102301
OK
profes@AI4PC150:~$ sudo service bind9 restart
profes@AI4PC150:~$ sudo gedit /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//Zona de resolución directa
zone "aulaI4.com" {
type master;
file "/etc/bind/db.aulaI4.com";
};
//Zona de resolución inversa
zone "192.in-addr.arpa" {
type master;
file "/etc/bind/db.192";
};
profes@AI4PC149:~$ sudo gedit /etc/bind/db.192
;
; BIND resolución inversa, dominio raíz i-addr.arpa
;
$TTL 38400 ;segundos que puede estar el registro en la caché
192.in-addr.arpa. IN SOA ai4pc150.aulaI4.com. profe.aulaI4.com. (
2013102301 ; Número de serie / Serial
10800 ; Actualización / Refresh
3600 ; Tiempo de reintentos / Retry
604800 ; Caducidad / Expire
38400 ) ; Valor TTL / Negative Cache TTL
;
192.in-addr.arpa. IN NS ai4pc150.aulaI4.com.
150.1.168.192.in-addr.arpa. IN PTR ai4pc150.aulaI4.com.
150.1.168 IN PTR ai4pc150.aulaI4.com.
101.1.168 IN PTR ai4pc101.aulaI4.com.
102.1.168 IN PTR ai4pc102.aulaI4.com.
103.1.168 IN PTR ai4pc103.aulaI4.com.
104.1.168 IN PTR ai4pc104.aulaI4.com.
profes@AI4PC150:~$ named-checkzone 192.in-addr.arpa /etc/bind/db.192
zone 192.in-addr.arpa/IN: loaded serial 2013102301
OK
profes@AI4PC150:~$ sudo service bind9 restart
Configuración y comprobación de una zona inversa ------------------------------
profes@AI4PC150:~$ sudo gedit /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
//Zona de resolución directa
zone "aulaI4.com" {
type master;
file "/etc/bind/db.aulaI4.com";
};
//Zona de resolución inversa versión 2
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
profes@AI4PC150:~$ sudo gedit /etc/bind/db.192.168.1
;
; BIND resolución inversa, dominio raíz in-addr.arpa
;
$TTL 38400 ;segundos que puede estar el registro en la caché
1.168.192.in-addr.arpa. IN SOA pc149.aulaSER.com. profe.aulaSER.com. (
2011100401 ; Número de serie / Serial
10800 ; Actualización / Refresh
3600 ; Tiempo de reintentos / Retry
604800 ; Caducidad / Expire
38400 ) ; Valor TTL / Negative Cache TTL
;
1.168.192.in-addr.arpa. IN NS pc149.aulaSER.com.
149.1.168.192.in-addr.arpa. INPTR pc149.aulaSER.com.
149 IN PTR pc149.aulaSER.com.
101 IN PTR ai4pc101.aulaI4.com.
102 IN PTR ai4pc102.aulaI4.com.
103 IN PTR ai4pc103.aulaI4.com.
104 IN PTR ai4pc104.aulaI4.com.
105 IN PTR ai4pc105.aulaI4.com.
106 IN PTR ai4pc106.aulaI4.com.
107 IN PTR ai4pc107.aulaI4.com.
108 IN PTR ai4pc108.aulaI4.com.
22IN PTR pcp22.aulaI4.com.
150 IN PTR pc150.aulaI4.com..
profes@AI4PC150:~$ named-checkzone 1.168.192.in-addr.arpa /etc/bind/db.192.168.1
zone 1.168.192.in-addr.arpa/IN: loaded serial 2013102301
OK
profes@AI4PC150:~$ sudo service bind9 restart
Instalacion Dns Ubuntu Directa
Para instalar el
servicio DNS Bind9, se puede abrir el gestor de paquetes Synaptic
(centro de Software de Ubuntu)
Inicialmente
lo haremos desde la consola o terminal:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bind9
bind9-doc dnsutils
Para lanzar el servicio debemos
ejecutar la orden siguiente:
# /etc/init.d/bind9 start
# /etc/init.d/bind9 start
Actualizando:
sudo apt-get update
sudo
apt-get upgrade
Servidor DNS:
sudo
apt-get install bind9
Hay paquetes que no son necesarios y se pueden quitar:
sudo apt-get autoremove
Para parar el servicio debemos ejecutar la orden siguiente:
sudo /etc/init.d/bind9 stop
sudo /etc/init.d/bind9 start
sudo /etc/init.d/bind9 status
sudo /etc/init.d/bind9 reload
sudo /etc/init.d/bind9 restart
Hay paquetes que no son necesarios y se pueden quitar:
sudo apt-get autoremove
Para parar el servicio debemos ejecutar la orden siguiente:
sudo /etc/init.d/bind9 stop
sudo /etc/init.d/bind9 start
sudo /etc/init.d/bind9 status
sudo /etc/init.d/bind9 reload
sudo /etc/init.d/bind9 restart
Dentro de los siguientes archivos o ficheros debemos tener:
No se modifica:
sudo gedit /etc/bind/named.conf
named.conf
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
Se configura la
zona de resolución directa de tipo maestra y el nombre del fichero
que contiene los registros.
sudo gedit /etc/bind/named.conf.local
named.conf.local
// Do any local configuration here
// Consider adding the 1918 zones here, if they are
not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "aulaI4.com" {
type master;file "/etc/bind/db.aulaI4.com";
};
Fichero de zono, resolución directa (con el nombre se obtiene la dirección IP)
sudo gedit /etc/bind/db.aulaI4.com
db.aulaI4.com
; BIND fichero de datos de la zona directa del aula 32I
$TTL 38400 ;segundos que puede estar el registro en la caché
; se pone el nombre de la zona o @ que representa el nombre del fichero
aulaI4.com. IN SOA ai4pc150.aulaI4.com. profe.aulaI4.com. (
2013102201 ; Número de serie / Serial
10800 ; Actualización / Refresh
3600 ; Tiempo de reintentos / Retry
604800 ; Caducidad / Expire
38400 ) ; Valor TTL / Negative Cache TTL
;
; Atención al punto final, con él no añade nombre
de la zona
aulaI4.com. IN NS ai4pc150.aulaSER.com.
aulaI4.com. IN A 192.168.1.150
ai4pc150 IN A 192.168.1.150
ai4pc101.aulaI4.com. IN A 192.168.1.101
ai4pc102.aulaI4.com. IN A 192.168.1.102
ai4pc103.aulaI4.com. IN A 192.168.1.103
ai4pc104.aulaI4.com. IN A 192.168.1.104
ai4pc105.aulaI4.com. IN A 192.168.1.105
ai4pc106.aulaI4.com. IN A 192.168.1.106
ai4pc107.aulaI4.com. IN A 192.168.1.107
ai4pc108.aulaI4.com. IN A 192.168.1.108
ai4pc109 IN A 192.168.1.109
ai4pc110 IN A 192.168.1.110
ai4pc111 IN A 192.168.1.111
ai4pc112 IN A 192.168.1.112
ai4pc113 IN A 192.168.1.113
ai4pc114 IN A 192.168.1.114
ai4pc115 IN A 192.168.1.115
Comandos de comprobación de la configuración:
sudo named-checkconf
sudo named-checkconf /etc/bind/named.conf
Comprobación del fichero de zona:
sudo named-checkzone aulaI4.com /etc/bind/db.aulaI4.com
Instalación del servidor de shell seguro – SSH
Instalación del servidor de shell seguro – SSH
Para instalar el servidor y el cliente ssh debemos instalar mediante apt-get el paquete ssh que contiene tanto la aplicación servidora como la aplicación cliente:
// Instalación de servidor ssh y cliente ssh root@cnice-desktop:# apt-get install sshLos archivos de configuración son:
- /etc/ssh/ssh_config: Archivo de configuración del cliente
ssh
- /etc/ssh/sshd_config: Archivo de configuración del servidor
ssh
Arranque y parada manual del servidor ssh
El servidor ssh, al igual que todos los servicios en Debian, dispone de un script de arranque y parada en la carpeta /etc/init.d.// Iniciar o Reiniciar el servidor ssh root@cnice-desktop:# /etc/init.d/ssh restart service ssh start // Parar el servidor ssh root@cnice-desktop:# /etc/init.d/ssh stop service ssh stop
Arranque automático del servidor ssh al iniciar el sistema.
Para un arranque automático del servicio al iniciar el servidor, debemos crear los enlaces simbólicos correspondientes tal y como se indica en el apartado Arranque automático de servicios al iniciar el sistema.Conexión al servidor mediante ssh
Para conectar desde un PC cliente al servidor mediante ssh, debemos ejecutar el comando ssh seguido del nombre ó dirección IP del servidor. La conexión se realizará con el mismo nombre de usuario que estemos utilizando en el PC cliente. Ejemplo, supongamos que jessica, desde el PC llamado aula5pc3, quiere conectarse al servidor cuya IP es 192.168.1.239:// Conexión por ssh jessica@aula5pc3:~$ ssh 192.168.1.239
TÚNEL PARA BASE DE DATOS MYSQL
TÚNEL PARA BASE DE DATOS MYSQL
En el servidor Linux Ubuntu:Instalación del servidor SSH (no es necesario repetir)
sudo apt-get install ssh
Instalación del servidor MySQL
sudo apt-get install mysql-server mysql-workbench
password para el usuario 'root' del servidor de la base de datos MySQL
Prueba de la utilidad de gestión de MySQL
mysql-workbench
Se crea una nueva instancia para administrar el servidor mySQL con los datos de nuestro servidor:
localhost / root / 3306
Se prueba la instancia recién creada.
Y se crea un usuario.
SECURITY / Users and Privileges / Add Account
usuario en la base de datos: bdadmin
Administrativa Roles DBA
Nuevo usuario en el sistema, para esta prueba:
sudo adduser admremoto
####################################################
Desde otro equipo, cliente Windows 7 o XP:
Se necesita putty yMySQL Workbench
http://dev.mysql.com/downloads/file.php?id=415341
En putty:
Session SSH con la dirección IP del servidor.
Connection / SSH marcar * Dont start a shell or command at all
Connection / SSH / Tunnels
Source port 3306
Destination localhost:3306
Add
open
login: admremoto
Se mantiene la conexión abierta en putty y se lanza el cliente MySQL Workbench
new connection
Conexión de prueba
localhost
3306
bdadmi
Servidor web Apache2 sobre Linux Ubuntu
Instalación de servidor web Apache2 sobre Linux Ubuntu 12.04
sudo apt-get updatesudo apt-get upgrade
sudo apt-get install apache2
http://localhost
It works!
El directorio raíz de documentos web está en:
/var/www
La página web por defecto es:
index.html
Modifica este fichero html, como prefieras
sudo service apache2 status
sudo service apache2 stop
sudo service apache2 start
sudo service apache2 restart
sudo /etc/init.d/apache2 status
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 restart
Suscribirse a:
Entradas (Atom)