Pages

Monday, January 16, 2012

Securing SSH

I got this brilliant tips from CentOS Wiki..


6. Filter SSH at the Firewall


If you only need remote access from one IP address (say from work to your home server), then consider filtering connections at your firewall by either adding a firewall rule on your router or in iptables to limit access on port 22 to only that specific IP address. For example, in iptables this could be achieved with the following type of rule:
iptables -A INPUT -p tcp -s 72.232.194.162 --dport 22 -j ACCEPT

SSH also natively supports TCP wrappers and access to the ssh service may be similarly controlled using hosts.allow and hosts.deny.
If you are unable to limit source IP addresses, and must open the ssh port globally, then iptables can still help prevent brute-force attacks by logging and blocking repeated attempts to login from the same IP address. For example,
iptables -A INPUT -p tcp --dport 22 -m recent --set --name ssh --rsource
iptables -A INPUT -p tcp --dport 22 -m recent ! --rcheck --seconds 60 --hitcount 4 --name ssh --rsource -j ACCEPT

The first rule records the IP address of each attempt to access port 22 using the recent module. The second rule checks to see if that IP address has attempted to connect 4 or more times within the last 60 seconds, and if not then the packet is accepted. Note this rule would require a default policy of DROP on the input chain.
Here's another example, this time using iptables limit module to limit the the number of connections to the ssh port to 3 per minute:
iptables -A INPUT -p tcp --dport 22 --syn -m limit --limit 1/m --limit-burst 3 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 --syn -j DROP

The first line will accept new connections on port 22 provided that IP address hasn't made more than 3 connection attempts in the last minute. If more than 3 connection attempts have been made within the last minute, then the second line will DROP the connection.
Don't forget to change the port as appropriate if you are running ssh on a non-standard port. Where possible, filtering at the firewall is an extremely effective method of securing access to an ssh server. 


http://wiki.centos.org/HowTos/Network/SecuringSSH

and this is from cybercity...


#16: Thwart SSH Crackers (Brute Force Attack)

Brute force is a method of defeating a cryptographic scheme by trying a large number of possibilities using a single or distributed computer network. To prevents brute force attacks against SSH, use the following softwares:
  • DenyHosts is a Python based security tool for SSH servers. It is intended to prevent brute force attacks on SSH servers by monitoring invalid login attempts in the authentication log and blocking the originating IP addresses.
  • Explains how to setup DenyHosts under RHEL / Fedora and CentOS Linux.
  • Fail2ban is a similar program that prevents brute force attacks against SSH.
  • security/sshguard-pf protect hosts from brute force attacks against ssh and other services using pf.
  • security/sshguard-ipfw protect hosts from brute force attacks against ssh and other services using ipfw.
  • security/sshguard-ipfilter protect hosts from brute force attacks against ssh and other services using ipfilter.
  • security/sshblock block abusive SSH login attempts.
  • security/sshit checks for SSH/FTP bruteforce and blocks given IPs.
  • BlockHosts Automatic blocking of abusive IP hosts.
  • Blacklist Get rid of those bruteforce attempts.
  • Brute Force Detection A modular shell script for parsing application logs and checking for authentication failures. It does this using a rules system where application specific options are stored including regular expressions for each unique auth format.
  • IPQ BDB filter May be considered as a fail2ban lite.



http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html

Tuesday, January 3, 2012

Note: Oci8 Performance Tuning @ My Office

Using Server with 4-core Processor & 16 Gigs RAM, this webserver getting much slower after the newly launched program that accessed by about 1500-2500 people in an hour.

Then i tried to optimize settings in php.ini and httpd.conf, but it isn't worked! The page that ussually can be accessed by 1 second, still have to take 2 minutes to be accessed. RAM usage reaching 10 Gigs!

After reading http://issuu.com/ky-c/docs/php-oci8#download i then tried to switch the connection to persistent.. and Alhamdulillah.. it works!!

Tha access time is back to normal, or maybe a little bit faster than before... and the RAM usage is average to 5 Gigs...




Wednesday, December 28, 2011

CyanogenMod7 227 nightly cutomized by crystal.cloud


taken from: http://www.kaskus.us/showthread.php?t=10130700&page=116

Originally Posted by crystal.cloud View Post
mau share nih rom cm7 base racikan gw sendiri dr cm 227 nightly < gingerbread 2.3.7
untuk yang newbie dan bingung cari rom yang stabil



fitur :

- optimised rom size for improove perfomance < gw kurangin file yang ga perlu >
- fully functional a2sd & swap
- included youtube & standard task killer dari rom standard froyo bawaan

- sanggup buka lebih dari 10 aplikasi sekaligus

- changed default boot animation to custom < pict di bawah>
Spoiler for boot animation:





donload

Code:
rom >>>>   http://www.media*fire..com/?re48sc0stpte66v

market , a2sdgui dan script >>> http://www.media*fire..com/?03nj39xsol3v4ol
Spoiler for screenshoot:







cara partisi sdcard pake partition wizard :

1. partisi 1>> fat32 set as primary
2. partisi 2>> ext4 set as primary < cluster size 4kb >
3. partisi 3>> swap set as pimary





aturan pakai :

1. install rom via boot recovery
2. setelah selesai jangan diapa2in dulu , reboot lg masuk ke boot recovery trus install dtapps2sd < darktermor >

3. kalo udah install a2sdgui kemudian set swap 90 , trus move dalvik to sd ext
tunggu sampai reboot

4. kalo udah masuk ke setting >> cyanogen setting :

- vm heapsize 48m
- compcache 26%

5. untuk yang mau install market bisa diinstall via boot recovery



kalo ada yang ga ngerti bisa pm g yaa
pengennya sih mau custom statusbar pake punya miui tp sayang nya msh blom ada waktu
ditunggu reviewnya yaa

Friday, December 23, 2011

Using ZTE MF 651 Modem on Ubuntu 11.10

Alhamdulillah.. after a week trying to connect my new ZTE MF 651 modem on Ubuntu 11.10, at last i found the how-to.
At first, my modem was only detected by lsusb. It shows like this:

Bus 002 Device 004: ID 19d2:0146 ONDA Communication S.p.A.

Next, i installed usb-modeswitch and create config file:
vi /etc/udev/rules.d/zte_mf651.rules
then fills it with:
SYSFS{idVendor}=="19d2", SYSFS{idProduct}=="0146", RUN+="/usr/bin/eject %k", OPTIONS+="last_rule"
save, and reboot.

voila! After rebooting, my modem was detected!! Just as simple as that...


ref:
http://askubuntu.com/questions/45841/which-usb-modeswitch-d-file-do-i-need-to-use

Oracle 11gR2 Express Edition on Linux Ubuntu 11.10 how-to

https://forums.oracle.com/forums/thread.jspa?threadID=2301639&tstart=0

Wednesday, December 7, 2011

ZTE Blade References


http://ptspts.blogspot.com/2011/04/how-to-install-cyanogenmod-to-zte-blade.html

Elite Blade ROM (can it be use for gen2?):
http://forum.xda-developers.com/showthread.php?t=1310050

Flashing firmware guide
http://android.modaco.com/topic/339048-guide-flashing-firmware-to-bladelibra-via-windows/