Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

1/30/2016 Problem Restarting Apache2: Solutions

If you're using apache 2 as webserver maybe sometimes you'll have to deal with common problems like vhost, syntax errors,  bad configurations. Sometimes is when you edit a file inside  /etc/apache2/sites-enabled/file.conf and maybe your edition just didn't accomplish with the syntax so here  is how can you check :

1. Make sure that your Apache2 service is up and running.
user@~$sudo service apache2 status 
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
   Active: active (running) since Fri 2016-01-29 14:05:16 EST; 14s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 31573 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 17063 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 30948 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS) 
  ... 

If this isn't the output, read carefully the error.
2. Check your systemctl status, this will give you a lot of information.
user@~$sudo systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2016-01-29 13:48:57 EST; 18s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 31573 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 17063 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 30467 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
3. Run the apache config test. It is always a good idea to run configtest everytime you make changes to the apache2 config file so that you won't accidentally stop apache2 service
user@~$ sudo apache2ctl configtest
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
4. Restart the apache service
user@~$ sudo service apache2 stop && sudo service apache2 start

References:

[1]http://www.techrepublic.com/article/troubleshoot-apache-problems-with-these-tips/
[2]https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-site-issues-on-a-linux-server
[3]https://www.linode.com/docs/troubleshooting/troubleshooting-common-apache-issues
Digg it StumbleUpon del.icio.us

9/01/2014 Pwnables.kr


Well this post is to share with you an amazing site saw in #pwning channel ,I say that because in this site we can practice all the important aspects (Reversing, Programming, System Knowledge and Exploitation)it has a special thing where you need to know about Gnu/Linux Operative System and it is intended for students,professionals and enthusiast  of  Information Security.

The site is divided in four categories as it is explained below :

  1. Toddler's Bottle: Tasks for beginners. Basic tasks for pwning. Somewhat educative. 
  2. Rookiss: These tasks suffers from typical rookie mistakes regarding computer security.
  3. Grotesque: These tasks are somewhat difficult to exploit, you need to buckle down and focus to solve these tasks.
  4. Hackers's Secret: Advanced system knowledge is required for pwning these tasks. Being smart isn't enough.

The learning process is part of you , here you'll need to do the proper homework , it can overcome the limitations imposed by the concept of tacit, also the fun thing is the key to pass some of the challenges.

Play Just for fun not for profit.



Digg it StumbleUpon del.icio.us

2/05/2014 Rate My Network Diagram!

If you have been searching on the web for network diagrams of large,small and home networks this site is for you.
Here you will be able to rate the network from 0(worst) to 10 (awesome!), this vote will be added to the rating system within this awesome site.It is recommended for ccna students , pentesters and so on.


The idea of setting this site up was not to make it possible for people to vote on the "look" of a network diagram. The purpose of this site is to allow people to learn about computer networking and network documentation by seeing what other people have done with their networks -- all for free.

Along with rating network diagrams, users may also leave comments or messages in the RMND forum to interact with other users of the site. When rating other user's network diagrams or designing your own diagram, please keep in mind ratings should be based on the function of the network and not the graphic design capabilities of the network administrator.

How it works: You signup and become a member. Once signed up you can upload your image. Once we approve your image, it will begin to appear on the site. Visitors will view your image and rate it depending on their own personal opinion of the flow, functionality, implementation, etc. of your network. Visitors may also leave public comments about you, and some may even decide to leave you a private message.

Rules: No porn allowed! We approve all images before being shown on the site. So you lose either way, if you upload porn you will be deleted. To keep the site as fast as possible, all images must be smaller than 350 Kb in file size.

Link : http://www.ratemynetworkdiagram.com/







Digg it StumbleUpon del.icio.us

10/31/2011 Portal Cautivo Comcel 3g 1 de 2



Es posible llevar acabo una conexion atravez de 3g atravez de un celular que soporta la caracteristica
resulta logico  decir  que algunos proveedores estan haciendo uso de los captive portals 
o portales cautivos como de aseguramiento  y verificacion si el cliente tiene saldo o no.Recientemente una amiga me a traido su equipo para arreglarlo,la cosa cual iva de reinstalar sistema operativo generar un reporte y hacer unas pruebas sobre hardware en memoria la solucion va de reemplazar la memoria ram,por cosas de la vida ella aun  no ha venido por el equipoy decidido revisar un celular el cual hay en casa que  nadie a usado,resulta ser un lg el tiene la capacidad para 3g.Ya anteriormente miravamos como realizar el bypass de esta medida  de seguridad que se esta implementando en hoteles,en resumen de anteriores post  solo es cambiar nuestra mac address  por una de un cliente el cual se encuentre connectado al ap,pero que pasa en  redes 3g cuando solo tu estas usando simcard o SIM HOLDER! y la conexion es atravez de antenas repetidoras como en la imagen :
En este caso en vez de un ms un oprador de servicios




...Buena pregunta resulta que si nos conectamos atravez del celular y elegimos perfil de
red  seleccionamos nuestro perfil de red en mi caso COMCEL
apn:internet.comcel.com.co
numero de llamada :*99#
usuario :COMCELWEB
password :COMCELWEB

finalmente realizamos nuestra coneccion y quedara establecidad.


aqui es donde viene el bypass de portal cautivo obteniendo la siguiente salida :

observamos que se encuentran usando los opendns !, nuestra tarea para saltar esto es usar iodine, realizar un tunnel dns para no tener que pagar nada :-).Por cuestiones legales con la nueva ley de regulación  telecomunicaciones esto quizás podria tener repercusiones...
Pueden mirar un ejemplo de uso de iodine.


hasta la proxima :)
Digg it StumbleUpon del.icio.us

6/12/2011 Distribucion OpenBsd Colombiana



OpenBsd Adj es una de las primeras distribuciones colombianas de este hermoso Sistema Operativo con el que muchos trabajamos y hacemos pruebas,como ustedes  saben OpenBSD no ha sido diseñado como sistema operativo de escritorio, sino para manejar un servidor conectado a Internet de forma extra-segura, sin embargo diversos desarrolladores han buscado mejorar su usabilidad en el escritorio,Openbsd Adj(Aprendiendo de Jesus) pretende ser mas usable como entorno de escritorio para personas que desean  tener seguridad al 100%  puesto que openbsd tiene un modo de Instalacion  por default  seguro,Vladimir Tamara  uno de los creadores ,esta realizando una serie de Cursos en p2pUniversity para todos aquellos que tengan las nociones basicas de Uso en Gnu/Linux .

Asi que les dejo el link para la documentacion que hasta ahora hay :

http://structio.sourceforge.net/guias/usuario_OpenBSD/index.html#introduccion

El curso :

http://new.p2pu.org/es/groups/openbsd-adj-como-sistema-de-escritorio/
Digg it StumbleUpon del.icio.us

5/03/2011 i3 en Openbsd

Durante esta semana un compañero de estudio me a pedido que organize su sistema,diciendo que simplemente era para hacer una instalacion de Openbsd y Organizar los servicios comunes para desarrollar web(Servidor Apache+Mysql..)yo creyendo en pablo decidio hoy martes ir a su casa a revisar y hacerle el favor de una vez.Cuando el me dijo realmente parecia sencillo y era realizar configuraciones de rutina:

  • Configuracion de Usuarios

  • Configuracion Packet Filter

  • Configuracion de Apps

  • Configuracion Grsecurity (Aunque ya no tan necesario)

  • Configuracion de X11

  • SSH

  • Pkg


entre otras tareitas que quizas cualquiera con capacidad lectora pudiece ;-D hacerlo Llegando a su casa me encuentro con esta sorpresa :


Dentro de mi (Realmente este man tiene excelentes maquinas :-( ),en fin comence y me di a la tarea de configurar y organizar toda el particionado de los 8 Tb que me habia  dejando para la tarea, un disco de un 1 Tb por aparte para la instalacion de dos linux,quedando asi lo que organize :

  • Power Edge :OpenBsd 4.9
    Torre Tower Multiple : particion /var/log
    Y dos Desktops normales :Otros linux
    Y algunos otros discos sin particionar


La cuestion es que todo tenia que verse en dos monitores lo cual no sabia hacer asi que encontre este articulo
http://www.ibm.com/developerworks/library/os-mltihed/ muy interesante por cierto.

Realizando todo con normalidad me tope con un problema con el pkg y era que no salia internet ....habiendo olvidado reiniciar decidi hacerlo por que parecia un error en  un archivo en perl

/usr/libdata/perl5/site_perl/i386-openbsd/rpc/types.ph


quedandome con la duda ?.ahora si simplemente haciendo :
#echo 'export PKG_PAHT=ftp://ftp.openbsd.org/pub/OpenBSD/4.9/packages/xx/'>> ~.profile
me quite el problema de estar exportando la ruta de los paquetes asi cada vez que reinicie no voy a tener 
ese problema
instalando I3
Para los que no sepais que es I3 dejo su definicion :

i3 is a tiling window manager, completely written from scratch.

i3 was created because wmii, our favorite window manager at the time, didn’t provide some features we wanted (multi-monitor done right, for example), had some bugs, didn’t progress since quite some time and wasn’t easy to hack at all (source code comments/documentation completely lacking). Still, we think the wmii developers and contributors did a great job. Thank you for inspiring us to create i3.

Please be aware that i3 is primarily targeted at advanced users and developers.

Lo primero que se hace es descargar el packete ya sea desde los ports o paquetes en este caso :

#pkg_check

#pkg_add i3
# pkg_info i3
Information for inst:i3-3.5.1p2

Comment:
improved dynamic tiling window manager

Description:
i3 is an improved dynamic, tiling window manager originally inspired
by wmii.

Maintainer: David Coppa <dcoppa@openbsd.org>

WWW: http://i3.zekjur.net/

una vez tenemos i3 instalado podemos ver que en nuestro usuario sin permiso no puede iniciar las x de i3 si
no las de Fvwn.para ello solo hacemos en nuestro archivo .xinitrc la llamada a i3
$mkdir ~/.i3
$cp /etc/i3/config ~/.i3/config
$ vi ~/.xinitrc

añadimos las siguientes lineas
#!/bin/sh
xsetroot -solid black
exec /usr/local/bin/i3
$ln -s ~/.xinitrc ~/.Xsession
Y eso fue todo por hoy :-d
Digg it StumbleUpon del.icio.us

1/25/2011 Free Shell Accounts

Durante esta semana me la e pasado buscando servidores que me permite interactuar con diferentes sistemas operativos y llevar acabo algunos proyecticos que tengo,algunas de las que listare te permitiran crear una cuenta en sus servidores algunos te permitiran cifrar tus archivos otros no pero son muy valiosos eso si todo desde una terminal al estilo minimalista y claro por que es mejor asi al estilo antiguo

http://freeshell.org 80 MB ssh,telnet,DSO/PPP/diauluo acces,email,usenet,chat,webspace,python..... NetBSD.
Modo de uso ssh freeshell.org -l

http://sdf.org/?signup 2MB ssh and telnet, email. OpenBSD
Modo de uso ssh new@sdf.org

http://www.nyx.net/ the oldest free public access ISP offers a text-based newsfeed, email, web access, lynx, webspace hosting SunOS(nyx)
Modo de uso telnet nyx.nyx.net no soporta ssh !dont support ssh

http://www.bshellz.net/ GNU tools, gcc, g++, make,Perl, Tcl, Python, Ruby, Bash Subversion Irssi ,ademas :(FiSH, OTR, SILC, XMPP),finch / pidgin,centerim,ekg,BitchX,Bitlbee server (MSN, ICQ, YAHOO, etc...),Jabber y otras cosas mas 50MB Debian,lo malo es que cada semana debes estar recordando que estas vivo para que tu cuenta no se borre a la semana."The very bad is that you remember one week for the account dont delete of servers how go to the irc.freenode.org #bshellz and type !keep"

Espero les sirva la informacion,estas son las que e usado , conoces otras ?
Digg it StumbleUpon del.icio.us

1/07/2011 Unix, Linux, and BSD: Command Line Cheat Sheet

The following command line cheat sheet for Unix, Linux, and BSD systems is from my new book Introduction to the Command Line (available now a Amazon.com).

Help Commands

man - Online manual
whatis - Displays manual descriptions

File and Directory Commands

ls - Lists directory contents
pwd - Prints the current directory
cd - Change directories
mv - Move files
cp - Copy files
rm - Delete files
mkdir - Create directories
rmdir - Remove directories
find - Search for files (slow)
locate - Search for files (faster)
whereis - Display binary file location
which - Display binary file location
file - Display file type
size - Display file size
stat - Display file statistics
fuser - Identify open files
touch - Update file timestamps
lsof - List open files
cksum - Calculate checksum
md5sum - Calculate md5sum
ln - Create a link
alias - Display/edit command aliases
gzip - Compress files
gunzip - Uncompress files
shred - Securely delete files
head - Display the head of a file
tail - Display the tail of a file
tee - Display and redirect output
sort - Sort input files/streams
grep - Display matching results
tree - Display directory tree
more - Display files one page at a time
less - Display files one page at a time
wc - Count words/lines/letters
cat - Display files
zcat - Display compressed files
diff - Show differences between files
strings - Display printable characters
sed - Text editing utility
awk - Text processing utility
dos2unix - Convert DOS files to Unix
unix2dos - Convert Unix files to DOS

Editors

nano - Simple text editor
vi - Advanced text editor
emacs - Ultimate text editor

Other Utilities

clear - Clear terminal screen
date - Display the date
cal - Display a calendar
watch - Monitor a command
env - Display environment variables
history - Display command history
logout - Logout of the shell
exit - Exit the shell

Users and Groups

su - Switch user
sudo - Run a program as another user
id - Display user identity
ulimit - Display user limits
who - Display who is logged in
w - Display what users are doing
users - Display active user accounts
last - Display last user logins
lastlog - Display all user’s last login
wall - Send a message to all users
whoami - Display current user id
finger - Display information about a user
chown - Change file/directory ownership
chgrp - Change file/directory group
chmod - Change file/directory permissions
umask - Display or set umask settings
passwd - Set/change password
useradd - Create user accounts
userdel - Delete user accounts
usermod - Modify user accounts
groupadd - Create group accounts
groupdel - Delete group accounts
groupmod - Modify group accounts

Process Control

ps - Display running processes
pgrep - Search for running processes
pidof - Search for PID by name
pstree - Displays process in tree view
kill - Terminate a process by PID
killall - Terminal a process by name
nice - Run a program with a modified priority
renice - Adjust a program's priority
nohup - Run a program immune to hang-ups
& - Run a program in the background
bg - Move a job to the background
jobs - Display running jobs
fg - Move a job to the foreground

Startup and Shutdown

shutdown - Shutdown the computer
poweroff - Poweroff the computer
halt - Halt the computer
runlevel - Display the current runlevel
telinit - Change runlevel
service - Stop and stop services
sysv-rc-conf - Runlevel configuration editor
update-rc.d - Debian runlevel editor
chkconfig - Red Hat runlevel editor
rc-update - Gentoo runlevel editor
rc-status - Gentoo service monitor

Networking Commands

hostname - Display the system hostname
domainname - Display the system domain
ifconfig - Manage network interfaces
ifup - Start network interfaces
ifdown - Stop network interfaces
iwconfig - Manage wireless interfaces
iwlist - Display wireless information
ethtool - Display network card info
arp - Display the ARP cache
ping - Send ICMP echo requests
traceroute - Trace network paths
tracepath - Trace network paths
nslookup - Query DNS servers
dig - Query DNS servers
host - Query DNS servers
whois - Query the whois database
dhclient - Linux DHCP client
netstat - Display network status
route - Manage network routes
tcpdump - Capture network packets
nmap - Scan remote computers
wavemon - Monitor wireless connections
smbtree - Display SMB servers/shares
nmblookup - Look up NetBIOS information
mount - Mount file systems
showmount - Show mounted file systems
umount - Unmount file systems
ssh - SSH client
telnet - Telnet client
ftp - FTP client
ncftp - Scriptable FTP client
mail - Email client
rsync - Rsync client

Hardware Commands

lspci - List PCI devices
pcidump - List PCI devices
lsusb - List USB devices
lshw - List hardware devices
lspcmcia - List PCMCIA devices
lshal - Display all system hardware
hdparm - Configure hard drives
eject - Eject removable media

Scheduling

batch - Run processes when the CPU is free
at - Run processes at a specific time
atq - Display the at queue
atrm - Remove jobs from the at queue
crontab - Display/edit cron jobs

File System Commands

fdisk - Partition editor
parted - Partition editor
mkfs - Create file systems
fsck - Check file systems
mkswap - Create swap space
swapon - Activate swap space
swapoff - Deactivate swap space
sync - Flush disk cache

Backup Commands

tar - Archive utility
dd - File copy utility
dump - Incremental backup utility
restore - Restore dump backups
mt - Tape device utility
cpio - Archive utility

Monitoring Commands

top - Performance monitor
mpstat - Performance monitor
vmstat - Virtual memory monitor
iostat - I/O performance monitor
nfsstat - NFS performance monitor
free - Display memory usage
df - Display disk usage
du - Display disk usage
uname - Display system information
uptime - Display system uptime
lsmod - List kernel modules
modinfo - Display module information
dmesg - Display kernel messages
strace - System trace debugger
ltrace -Library trace debugger
ipcs - IPC monitor
sysctl - Configure kernel parameters

Printing Commands

lp - Print files
lpstat - Display printer status
lpq - Display print queue
lprm - Remove print jobs
cancel - Cancel print jobs
enable - Enable a printer
disable - Disable a printer

Software Commands

dpkg - Debian package manager
apt-get - Debian package utility
rpm - Red Hat package manager
yum - Red Hat package utility
emerge - Gentoo package utility
pkg_add - BSD installation utility
pkg_delete - BSD uninstallation utility
make - Compile software from source
Digg it StumbleUpon del.icio.us