Pages

Thursday, May 19, 2011

Ubuntu SSH login delay

this is the trick:

vi /etc/ssh/sshd_config

then add:

UseDNS no

Save & reload SSH

Using Samba on Ubuntu

Configure: https://help.ubuntu.com/6.06/ubuntu/serverguide/C/configuring-samba.html

smbpasswd -a jseinfeld
  1. sudo apt-get install smbfs smbclient
  2. smbclient -L 192.168.1.2 -U%
  3. smbmount //192.168.1.2/Music /home/dbott/music -o username=dbott,password=mysecretpassword,uid=1000,mask=000
  4. smbumount /home/dbott/music
  5. adding in fstab (unsecure): //192.168.1.2/Music /home/dbott/music smbfs auto,username=dbott,password=mysecretpassword,uid=1000,umask=000,user 0 0
  6. adding in fstab (secure): //192.168.1.2/Music /home/dbott/music smbfs auto,credentials=/root/.credentials,uid=1000,umask=000,user 0 0
  7. gedit /root/.credentials
  8. and add the following text:
  9. username=your_smb_username
  10. password=your_smb_password
  11. Now, make the file only readable by root:
  12. sudo chmod 600 /root/.credentials
  13. At this point, you can either reboot or reload your fstab:
  14. sudo shutdown -r now
  15. sudo mount -a

ufw - The Uncomplicated Firewall on Ubuntu

ufw - Uncomplicated Firewall

The default firewall configuration tool for Ubuntu is ufw. Developed to ease iptables firewall configuration, ufw provides a user friendly way to create an IPv4 or IPv6 host-based firewall.

ufw by default is initially disabled. From the ufw man page:

“ ufw is not intended to provide complete firewall functionality via its command interface, but instead provides an easy way to add or remove simple rules. It is currently mainly used for host-based firewalls. ”

The following are some examples of how to use ufw:

  • First, ufw needs to be enabled. From a terminal prompt enter:

    sudo ufw enable 
  • To open a port (ssh in this example):

    sudo ufw allow 22 
  • Rules can also be added using a numbered format:

    sudo ufw insert 1 allow 80 
  • Similarly, to close an opened port:

    sudo ufw deny 22 
  • To remove a rule, use delete followed by the rule:

    sudo ufw delete deny 22 
  • It is also possible to allow access from specific hosts or networks to a port. The following example allows ssh access from host 192.168.0.2 to any ip address on this host:

    sudo ufw allow proto tcp from 192.168.0.2 to any port 22 

    Replace 192.168.0.2 with 192.168.0.0/24 to allow ssh access from the entire subnet.

  • Adding the --dry-run option to a ufw command will output the resulting rules, but not apply them. For example, the following is what would be applied if opening the HTTP port:

     sudo ufw --dry-run allow http 
    *filter :ufw-user-input - [0:0] :ufw-user-output - [0:0] :ufw-user-forward - [0:0] :ufw-user-limit - [0:0] :ufw-user-limit-accept - [0:0] ### RULES ###  ### tuple ### allow tcp 80 0.0.0.0/0 any 0.0.0.0/0 -A ufw-user-input -p tcp --dport 80 -j ACCEPT  ### END RULES ### -A ufw-user-input -j RETURN -A ufw-user-output -j RETURN -A ufw-user-forward -j RETURN -A ufw-user-limit -m limit --limit 3/minute -j LOG --log-prefix "[UFW LIMIT]: " -A ufw-user-limit -j REJECT -A ufw-user-limit-accept -j ACCEPT COMMIT Rules updated 
  • ufw can be disabled by:

    sudo ufw disable 
  • To see the firewall status, enter:

    sudo ufw status 
  • And for more verbose status information use:

    sudo ufw status verbose 
  • To view the numbered format:

    sudo ufw status numbered 
[Note]

If the port you want to open or close is defined in /etc/services, you can use the port name instead of the number. In the above examples, replace 22 with ssh.

This is a quick introduction to using ufw. Please refer to the ufw man page for more information.


Source: https://help.ubuntu.com/10.04/serverguide/C/firewall.html

Wednesday, May 18, 2011

Fat-16 drive will only allow a little over 500 files in one directory

According to Wikipedia:
Quote:
The number of root directory entries available is set at formatting time, and is stored in a 16-bit signed field setting an absolute limit of 32767 entries (32736, a multiple of 32, in practice). For historical reasons, FAT12 and FAT16 media generally use 512 root directory entries on non-floppy media, and other sizes may be incompatible with some software or devices (entries being file and/or folder names in the old 8.3 format).[9] Some third party tools like mkdosfs allow the user to set this parameter.[10]
Thus, my Fat-16 drive will only allow a little over 500 files in one directory.

Tuesday, April 26, 2011

Learn List

  • Web design concept
  • Web typography
  • CSS3
  • HTML5
  • CSS Frameworks: 960 & Blueprint
  • PyroCMS
  • ORM CI

Tuesday, April 19, 2011

Repairing the defaced website

For websites that has been defaced, reparation steps are:
1. if you use the CMS you should update to newest version of CMS, module, or plugins.
2. If you build your own website try scanning with Web Tools
Vulnerability as Accunetix and see who report any page
indicated injection, and then perform the filtering of the injection
from outside on the page.
3. to eliminate the appearance deface if only occur
adding a new page you simply delete the additional pages
them.
4. Checks whether there are Backdoors or Malicious Script on your host,
because most likely if the attacker has managed to take over
Your website must have 99% in planted by Malicious Script (Shell)

by h4ck3v1l @ jasakom