Crash course: Embedded programming with Arduino

Posted by Unknown Minggu, 25 Desember 2011 0 komentar

Try your hand at embedded programming with this project

Demand for embedded programming is growing like crazy, so anyone looking for some job security might consider becoming an ace embedded programmer. It helps to have some programming experience, but even raw beginners can get started inexpensively and learn on their own. One of the friendliest introductions to embedded coding is Arduino. Arduino is a popular open embedded hardware and software platform with hundreds of howtos and projects to try out. Today we review the basics of both electronics and Arduino coding in a fun holiday project, Singing Holiday Snowman.

Singing snowman

I'm going to take my old plastic snowman (figure 1) and outfit him to sing holiday songs whenever anyone approaches within a few feet, and to blink some festive red and green LEDs. (Half the fun of Arduino is blinky lights.) You, of course, may use any object you want. If you are new to electronics and embedded coding, give yourself a few days to put this together because it covers a lot of ground. This project gives hands-on experience in these essential fundamentals:

  • Soldering
  • Reading simple schematics
  • Loading and modifying Arduino programs


Figure 1: Plastic snowman before his operation, mute and unlit
Source: Carla Schroder

Prerequisites

The Singing Snowman is modeled on the Halloween Pumpkin project. Beginners should work through the first three of these excellent Arduino tutorials first. These will teach you how to install and use the Arduino software, and get acquainted with tools and Arduino parts. You'll be doing a fair bit of soldering; if you're not a good hand with a soldering iron, find some nothing-to-lose circuit boards and practice. The soldering page links to some good howtos.
Here is a handy hardware list. The first two items are nice kits that supply everything you need for Singing Snowman, plus leftovers for more projects.

  • Ladyada's Electronics Toolkit, $100. Includes a good adjustable temperature soldering iron, multimeter, snips, strippers, solder, solder sucker and braid, multimeter, vise, and other useful tools.
  • Adafruit ARDX - v1.3 Experimentation Kit. This includes red and green LEDs and matching resistors, printed howtos, breadboard, Arduino Uno, USB cable, wires, and other goodies for multiple projects. $85.
  • Adafruit Wave Shield for Arduino. This is the part that plays sounds. $22. You'll also need a SD/MMC card for storing audio files.
  • A small 8 ohm speaker, like an old PC speaker.
  • MaxBotix EZ1 sonar sensor. This will detect when someone is within a few feet of the snowman, and then it will play songs and animate the blinky lights. I use the MB1010 because it has a narrow sensitivity range to the front. There are three other versions with different sensitivity patterns.
  • Insulated 22-gauge solid-core wire in red, green, white, and black.
  • A magnifier and good light. I like magnifier lamps, and magnifier headlamps are nice too.
  • Wrist grounding strap. Arduino boards and accessories are pretty resilient to electrostatic discharge (ESD), but a strap is cheap insurance in a static-prone environment.
  • Drill and bits.
If you already have a well-equipped electronics workbench and don't need the two Adafruit kits, this is what you'll need for Singing Snowman:

  • Seven red and green LEDs with matching resistors
  • Arduino Uno
  • 9- or 12-volt power supply

Plus the other non-kit parts: Adafruit Wave Shield, MaxBotix EZ1, and wiring. Figure 2 shows my workbench with some of the tools and parts for this project.

Figure 2: Workbench for the singing holiday snowman project
Source: Carla Schroder

LEDs and resistors

You always need resistors with LEDs because resistors limit the current flowing to the LED to a safe level. Resistors are everywhere in electronics, and come in a huge variety of sizes and shapes. We are going to use through-hole carbon film resistors. A common beginner question is how do you know which resistors go with your LEDs? You need three pieces of information: The voltage of your power supply (Vs), and the voltage forward (Vf) and drive current (If) of the LED. Then calculate the resistor value (R), in ohms, like this: R = (Vs - Vf)/If.
For example, I have some of these 5mm red LEDs and a 9-volt power supply. So my equation is (9 - 1.85) / 0.02 = 357.5 ohms. The next highest standard resistor is 360 ohms at 1/2 watt, though most electronics gurus will go one higher and choose a 390 ohm resistor for a larger safety margin. A higher ohm value means more resistance and less current. You can damage LEDs with too much current. What does the watts value signify? That's how much power the resistor can handle. For low-power uses like our little blinky LEDS you'll see 1/8, 1/4, and 1/2 watt resistors. Try one of the many online LED calculators until you feel comfortable with your math, like this one.

Figure 3: The color-coding tells us this is a 390 ohm resistor
Source: Carla Schroder

That's for a single LED. We're using 7, so that changes our requirements. Again, there are handy online calculators to help us. The LED series/parallel array wizard calculates four different wiring layouts for you to choose from.
Resistors are color-coded. The color bars on the resistor in Figure 3 tell us this is rated at 390 ohms with 5% tolerance: Orange-White-Brown means 3-9- and one zero, or 390. The gold band = 5%. The tolerance rating is electronics-speak for plus/minus variance from the stated ohms.
Resistor color code tables are all over the place, on the Web and in books.

Assembly

The Wave Shield requires assembly and there is a lot of soldering, so do that first. When it's all together it will plug in nicely on top of your Arduino board. Then you'll solder your speaker and sonar sensor to the Wave board; follow the Halloween Pumpkin howto to see where the wires go. Make their wires long enough to allow you to mount the speaker and sensor where you want them inside your own project.
Use the LED series/parallel array wizard to figure out your LED wiring, and then solder your wiring harness together. Make sure your positive and negative leads are in correct order. The Halloween Pumpkin page says to use a glue gun to fasten the LEDs in place, but I prefer to drill holes that hold them snugly because it's less messy and easy to make changes. Once they're in place, solder the leads to the appropriate analog inputs and ground on your Wave board, and again leave enough slack in your wiring so you can move and easily access the Arduino and Wave Shield.
The clever part about the Halloween Pumpkin project is it saves a lot of code-writing by using an analog input to capture the audio output, which creates a variable-strength signal, and using that to animate the LEDs. Solder analog input #1 to the R7 1.5k resistor on the Wave board.
Plug your SD card into a PC in the usual way, with a card reader or built-in slot, and transfer your audio files to it. They must be in 22KHz 16-bit mono or lesser quality WAV. Then plug the card into the Wave Shield. Now you're ready to connect your PC to the Arduino with a USB cable, fire up the Arduino software, edit your sketch, and load it into the Arduino. One of Arduino's advantages is the speed of iteration -- you can quickly make and test changes in your code. Figure 4 shows my Singing Holiday Snowman in action.

Figure 4: Singing holiday snowman lit up and singing
Source: Carla Schroder

Arduino code

I'm using the Halloween Pumpkin sketch (an Arduino program is called a sketch) with some minor changes. The Arduino programming language is pretty much a slimmed-down C/C++. You will have to make some changes to this sketch, so look for my comments in the sketch which are enclosed in the standard C multi-line comment symbols, /* */. Single-line comments, which start with //, are the original comments from the original sketch author.
We covered a lot of ground in this Crash Course, and hopefully your project blinks and sings just the way you want. If something doesn't work right, and you can't figure it out, go back to the Arduino tutorials and review the basics, and the Arduino forums are a good source of help.

Additional references


Singing snowman sketch


#include 
#include
#include "util.h"
#include "wave.h"

AF_Wave card;
File f;
Wavefile wave;

// save RAM by using program memory strings
#define playcomplete(x) ROM_playcomplete(PSTR(x))

#define servo 7
#define redled 9
#define eyeleds 18
#define mouthleds 17
#define midmouthleds 16
#define outermouthleds 19

// set up Serial library at 9600 bps
void setup() {
Serial.begin(9600);
Serial.println("Wave test!");

/* Setup the LEDs */

pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(redled, OUTPUT);
pinMode(servo, OUTPUT);
pinMode(eyeleds, OUTPUT);
pinMode(outermouthleds, OUTPUT);
pinMode(midmouthleds, OUTPUT);
pinMode(mouthleds, OUTPUT);

randomSeed(analogRead(0));

/* Useful feedback if the SD card is missing
* or cannot be read */

if (!card.init_card()) {
putstring_nl("Card init. failed!"); return;
}
if (!card.open_partition()) {
putstring_nl("No partition!"); return;
}
if (!card.open_filesys()) {
putstring_nl("Couldn't open filesys"); return;
}

if (!card.open_rootdir()) {
putstring_nl("Couldn't open dir"); return;
}

putstring_nl("Files found:");
ls();
}

void ls() {
char name[13];
int ret;

card.reset_dir();
putstring_nl("Files found:");
while (1) {
ret = card.get_next_name_in_dir(name);
if (!ret) {
card.reset_dir();
return;
}
Serial.println(name);
}
}


void pulseServo(uint8_t servopin, uint16_t p) {

digitalWrite(servopin, HIGH);
delayMicroseconds(600);
while (p--) {
delayMicroseconds(4);
}
digitalWrite(servopin, LOW);
delay(18);
}

/* typedef unsigned char "snowmanstate"
* You can change this name to something
* suitable for your own project
* Measures how close people are and plays
* audio files according to distance */

uint8_t snowmanstate = 0;

void loop() {
int distsensor, i;
long time;
/*
for (i=0; i<50; i++) {
pulseServo(servo,0);
}
for (i=0; i<50; i++) {
pulseServo(servo,400);
}
return;
*/
distsensor = 0;
for (i=0; i<8; i++) {
distsensor += analogRead(0);
delay(50);
}
distsensor /= 8;

// putstring("Sensor = ");
Serial.println(distsensor);

/* A reading of 500 = more than 6 meters away, so once
* every 200 times play one of of three scary sounds
* when no one is present */

if (distsensor<= 500) {
digitalWrite(eyeleds, HIGH);
}
if (distsensor > 500) {
digitalWrite(eyeleds, LOW);

// nobody there. one out of 200 times play one of
// the scary sounds (once every few minutes)

/* Substitute your own audio file names */

snowmanstate = 1;
i = random(200);
//Serial.println(i);
if (i == 0) {
i = random(3);
if (i == 0) {
playcomplete("merryxmas.wav");
} else if (i == 1) {
playcomplete("hollyjolly.wav");
} else {
playcomplete("jinglebellsbatmansmells.wav");
}
}

/* When someone comes closer play these files
* Substitute your own audio file names */

} else if ((distsensor > 300) && (distsensor < 400)) {
if (snowmanstate <= 1) {
playcomplete("rudolph.wav");
} else {
i = random(60);
//Serial.println(i);
if (i == 0) {
i = random(3);
if (i == 0) {
playcomplete("frosty.wav");
} else if (i == 1) {
playcomplete("kissingsanta.wav");
} else {
playcomplete("deckhalls.wav");
}
}
}
snowmanstate = 2;
} else if ((distsensor > 100) && (distsensor < 200)) {
if (snowmanstate <= 2) {
playcomplete("frosty.wav");
} else {
i = random(50); // more often
//Serial.println(i);
if (i == 0) {
i = random(3);
if (i == 0) {
playcomplete("gotell.wav");
} else if (i == 1) {
playcomplete("joyworld.wav");
} else {
playcomplete("letitsnow.wav");
}
}
}
snowmanstate = 3;
} else if (distsensor < 50) {
if (snowmanstate <= 3) {
playcomplete("linussong.wav");
} else {
i = random(30); // more often
//Serial.println(i);
if (i == 0) {
i = random(2);
if (i == 0) {
playcomplete("mrgrinch.wav");
} else if (i == 1) {
playcomplete("sleighride.wav");
}
}

}
snowmanstate = 4;
}
}

/* This part lights the LEDs according to
* the strength of the audio signal */

void ROM_playcomplete(const char *romname) {
char name[13], i;
uint8_t volume;
int v2;

for (i=0; i <13; i++) {
name[i] = pgm_read_byte(&romname[i]);
}
name[12] = 0;
Serial.println(name);
playfile(name);
while (wave.isplaying) {
volume = 0;
for (i=0; i<8; i++) {
v2 = analogRead(1) - 512;
if (v2< 0)
v2 *= -1;
if (v2 > volume)
volume = v2;
delay(5);
}
if (volume > 200) {
digitalWrite(outermouthleds, HIGH);
} else {
digitalWrite(outermouthleds, LOW);
}
if (volume > 150) {
digitalWrite(midmouthleds, HIGH);
} else {
digitalWrite(midmouthleds, LOW);
}
if (volume > 100) {
digitalWrite(mouthleds, HIGH);
} else {
digitalWrite(mouthleds, LOW);
}
//putstring("vol = "); Serial.println(volume, DEC);
}
card.close_file(f);
}

void playfile(char *name) {
f = card.open_file(name);
if (!f) {
putstring_nl(" Couldn't open file"); return;
}
if (!wave.create(f)) {
putstring_nl(" Not a valid WAV"); return;
}
// ok time to play!
wave.play();
}

Baca Selengkapnya ....

20 Iptables Examples For New SysAdmins

Posted by Unknown 0 komentar

Linux comes with a host based firewall called Netfilter. According to the official project site:
netfilter is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack.
This Linux based firewall is controlled by the program called iptables to handles filtering for IPv4, and ip6tables handles filtering for IPv6. I strongly recommend that you first read our quick tutorial that explains how to configure a host-based firewall called Netfilter (iptables) under CentOS / RHEL / Fedora / Redhat Enterprise Linux. This post list most common iptables solutions required by a new Linux user to secure his or her Linux operating system from intruders.

IPTABLES Rules Example

  • Most of the actions listed in this post are written with the assumption that they will be executed by the root user running the bash or any other modern shell. Do not type commands on remote system as it will disconnect your access.
  • For demonstration purpose I've used RHEL 6.x, but the following command should work with any modern Linux distro.
  • This is NOT a tutorial on how to set iptables. See tutorial here. It is a quick cheat sheet to common iptables commands.

#1: Displaying the Status of Your Firewall

Type the following command as root:
# iptables -L -n -v
Sample outputs:
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Above output indicates that the firewall is not active. The following sample shows an active firewall:
# iptables -L -n -v
Sample outputs:
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
394 43586 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
93 17292 ACCEPT all -- br0 * 0.0.0.0/0 0.0.0.0/0
1 142 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- br0 br0 0.0.0.0/0 0.0.0.0/0
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 state INVALID
0 0 TCPMSS tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
0 0 wanin all -- vlan2 * 0.0.0.0/0 0.0.0.0/0
0 0 wanout all -- * vlan2 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- br0 * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 425 packets, 113K bytes)
pkts bytes target prot opt in out source destination
Chain wanin (1 references)
pkts bytes target prot opt in out source destination
Chain wanout (1 references)
pkts bytes target prot opt in out source destination
Where,
  • -L : List rules.
  • -v : Display detailed information. This option makes the list command show the interface name, the rule options, and the TOS masks. The packet and byte counters are also listed, with the suffix 'K', 'M' or 'G' for 1000, 1,000,000 and 1,000,000,000 multipliers respectively.
  • -n : Display IP address and port in numeric format. Do not use DNS to resolve names. This will speed up listing.

#1.1: To inspect firewall with line numbers, enter:

# iptables -n -L -v --line-numbers
Sample outputs:
Chain INPUT (policy DROP)
num target prot opt source destination
1 DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
2 DROP all -- 0.0.0.0/0 0.0.0.0/0 state INVALID
3 TCPMSS tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
4 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
5 wanin all -- 0.0.0.0/0 0.0.0.0/0
6 wanout all -- 0.0.0.0/0 0.0.0.0/0
7 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Chain wanin (1 references)
num target prot opt source destination
Chain wanout (1 references)
num target prot opt source destination
You can use line numbers to delete or insert new rules into the firewall.

#1.2: To display INPUT or OUTPUT chain rules, enter:

# iptables -L INPUT -n -v
# iptables -L OUTPUT -n -v --line-numbers

#2: Stop / Start / Restart the Firewall

If you are using CentOS / RHEL / Fedora Linux, enter:
# service iptables stop
# service iptables start
# service iptables restart

You can use the iptables command itself to stop the firewall and delete all rules:
# iptables -F
# iptables -X
# iptables -t nat -F
# iptables -t nat -X
# iptables -t mangle -F
# iptables -t mangle -X
# iptables -P INPUT ACCEPT
# iptables -P OUTPUT ACCEPT
# iptables -P FORWARD ACCEPT

Where,
  • -F : Deleting (flushing) all the rules.
  • -X : Delete chain.
  • -t table_name : Select table (called nat or mangle) and delete/flush rules.
  • -P : Set the default policy (such as DROP, REJECT, or ACCEPT).

#3: Delete Firewall Rules

To display line number along with other information for existing rules, enter:
# iptables -L INPUT -n --line-numbers
# iptables -L OUTPUT -n --line-numbers
# iptables -L OUTPUT -n --line-numbers | less
# iptables -L OUTPUT -n --line-numbers | grep 202.54.1.1

You will get the list of IP. Look at the number on the left, then use number to delete it. For example delete line number 4, enter:
# iptables -D INPUT 4
OR find source IP 202.54.1.1 and delete from rule:
# iptables -D INPUT -s 202.54.1.1 -j DROP
Where,
  • -D : Delete one or more rules from the selected chain

#4: Insert Firewall Rules

To insert one or more rules in the selected chain as the given rule number use the following syntax. First find out line numbers, enter:
# iptables -L INPUT -n --line-numbers
Sample outputs:
Chain INPUT (policy DROP)
num target prot opt source destination
1 DROP all -- 202.54.1.1 0.0.0.0/0
2 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state NEW,ESTABLISHED
To insert rule between 1 and 2, enter:
# iptables -I INPUT 2 -s 202.54.1.2 -j DROP
To view updated rules, enter:
# iptables -L INPUT -n --line-numbers
Sample outputs:
Chain INPUT (policy DROP)
num target prot opt source destination
1 DROP all -- 202.54.1.1 0.0.0.0/0
2 DROP all -- 202.54.1.2 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state NEW,ESTABLISHED

#5: Save Firewall Rules

To save firewall rules under CentOS / RHEL / Fedora Linux, enter:
# service iptables save
In this example, drop an IP and save firewall rules:
# iptables -A INPUT -s 202.5.4.1 -j DROP
# service iptables save

For all other distros use the iptables-save command:
# iptables-save > /root/my.active.firewall.rules
# cat /root/my.active.firewall.rules

#6: Restore Firewall Rules

To restore firewall rules form a file called /root/my.active.firewall.rules, enter:
# iptables-restore < /root/my.active.firewall.rules
To restore firewall rules under CentOS / RHEL / Fedora Linux, enter:
# service iptables restart

#7: Set the Default Firewall Policies

To drop all traffic:
# iptables -P INPUT DROP
# iptables -P OUTPUT DROP
# iptables -P FORWARD DROP
# iptables -L -v -n
#### you will not able to connect anywhere as all traffic is dropped ###
# ping cyberciti.biz
# wget http://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-3.2-rc5.tar.bz2

#7.1: Only Block Incoming Traffic

To drop all incoming / forwarded packets, but allow outgoing traffic, enter:
# iptables -P INPUT DROP
# iptables -P FORWARD DROP
# iptables -P OUTPUT ACCEPT
# iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
# iptables -L -v -n
### *** now ping and wget should work *** ###
# ping cyberciti.biz
# wget http://www.kernel.org/pub/linux/kernel/v3.0/testing/linux-3.2-rc5.tar.bz2

#8:Drop Private Network Address On Public Interface

IP spoofing is nothing but to stop the following IPv4 address ranges for private networks on your public interfaces. Packets with non-routable source addresses should be rejected using the following syntax:
# iptables -A INPUT -i eth1 -s 192.168.0.0/24 -j DROP
# iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP

#8.1: IPv4 Address Ranges For Private Networks (make sure you block them on public interface)

  • 10.0.0.0/8 -j (A)
  • 172.16.0.0/12 (B)
  • 192.168.0.0/16 (C)
  • 224.0.0.0/4 (MULTICAST D)
  • 240.0.0.0/5 (E)
  • 127.0.0.0/8 (LOOPBACK)

#9: Blocking an IP Address (BLOCK IP)

To block an attackers ip address called 1.2.3.4, enter:
# iptables -A INPUT -s 1.2.3.4 -j DROP
# iptables -A INPUT -s 192.168.0.0/24 -j DROP

#10: Block Incoming Port Requests (BLOCK PORT)

To block all service requests on port 80, enter:
# iptables -A INPUT -p tcp --dport 80 -j DROP
# iptables -A INPUT -i eth1 -p tcp --dport 80 -j DROP

To block port 80 only for an ip address 1.2.3.4, enter:
# iptables -A INPUT -p tcp -s 1.2.3.4 --dport 80 -j DROP
# iptables -A INPUT -i eth1 -p tcp -s 192.168.1.0/24 --dport 80 -j DROP

#11: Block Outgoing IP Address

To block outgoing traffic to a particular host or domain such as cyberciti.biz, enter:
# host -t a cyberciti.biz
Sample outputs:
cyberciti.biz has address 75.126.153.206
Note down its ip address and type the following to block all outgoing traffic to 75.126.153.206:
# iptables -A OUTPUT -d 75.126.153.206 -j DROP
You can use a subnet as follows:
# iptables -A OUTPUT -d 192.168.1.0/24 -j DROP
# iptables -A OUTPUT -o eth1 -d 192.168.1.0/24 -j DROP

#11.1: Example - Block Facebook.com Domain

First, find out all ip address of facebook.com, enter:
# host -t a www.facebook.com
Sample outputs:
www.facebook.com has address 69.171.228.40
Find CIDR for 69.171.228.40, enter:
# whois 69.171.228.40 | grep CIDR
Sample outputs:
CIDR:           69.171.224.0/19
To prevent outgoing access to www.facebook.com, enter:
# iptables -A OUTPUT -p tcp -d 69.171.224.0/19 -j DROP
You can also use domain name, enter:
# iptables -A OUTPUT -p tcp -d www.facebook.com -j DROP
# iptables -A OUTPUT -p tcp -d facebook.com -j DROP

From the iptables man page:
... specifying any name to be resolved with a remote query such as DNS (e.g., facebook.com is a really bad idea), a network IP address (with /mask), or a plain IP address ...

#12: Log and Drop Packets

Type the following to log and block IP spoofing on public interface called eth1
# iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j LOG --log-prefix "IP_SPOOF A: "
# iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP

By default everything is logged to /var/log/messages file.
# tail -f /var/log/messages
# grep --color 'IP SPOOF' /var/log/messages

#13: Log and Drop Packets with Limited Number of Log Entries

The -m limit module can limit the number of log entries created per time. This is used to prevent flooding your log file. To log and drop spoofing per 5 minutes, in bursts of at most 7 entries .
# iptables -A INPUT -i eth1 -s 10.0.0.0/8 -m limit --limit 5/m --limit-burst 7 -j LOG --log-prefix "IP_SPOOF A: "
# iptables -A INPUT -i eth1 -s 10.0.0.0/8 -j DROP

#14: Drop or Accept Traffic From Mac Address

Use the following syntax:
# iptables -A INPUT -m mac --mac-source 00:0F:EA:91:04:08 -j DROP
## *only accept traffic for TCP port # 8080 from mac 00:0F:EA:91:04:07 * ##
# iptables -A INPUT -p tcp --destination-port 22 -m mac --mac-source 00:0F:EA:91:04:07 -j ACCEPT

#15: Block or Allow ICMP Ping Request

Type the following command to block ICMP ping requests:
# iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
# iptables -A INPUT -i eth1 -p icmp --icmp-type echo-request -j DROP

Ping responses can also be limited to certain networks or hosts:
# iptables -A INPUT -s 192.168.1.0/24 -p icmp --icmp-type echo-request -j ACCEPT
The following only accepts limited type of ICMP requests:
### ** assumed that default INPUT policy set to DROP ** #############
iptables -A INPUT -p icmp --icmp-type echo-reply -j ACCEPT
iptables -A INPUT -p icmp --icmp-type destination-unreachable -j ACCEPT
iptables -A INPUT -p icmp --icmp-type time-exceeded -j ACCEPT
## ** all our server to respond to pings ** ##
iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT

#16: Open Range of Ports

Use the following syntax to open a range of ports:
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 7000:7010 -j ACCEPT

#17: Open Range of IP Addresses

Use the following syntax to open a range of IP address:
## only accept connection to tcp port 80 (Apache) if ip is between 192.168.1.100 and 192.168.1.200 ##
iptables -A INPUT -p tcp --destination-port 80 -m iprange --src-range 192.168.1.100-192.168.1.200 -j ACCEPT

## nat example ##
iptables -t nat -A POSTROUTING -j SNAT --to-source 192.168.1.20-192.168.1.25

#17: Established Connections and Restaring The Firewall

When you restart the iptables service it will drop established connections as it unload modules from the system under RHEL / Fedora / CentOS Linux. Edit, /etc/sysconfig/iptables-config and set IPTABLES_MODULES_UNLOAD as follows:
IPTABLES_MODULES_UNLOAD = no

#18: Help Iptables Flooding My Server Screen

Use the crit log level to send messages to a log file instead of console:
iptables -A INPUT -s 1.2.3.4 -p tcp --destination-port 80 -j LOG --log-level crit

#19: Block or Open Common Ports

The following shows syntax for opening and closing common TCP and UDP ports:
 
Replace ACCEPT with DROP to block port:
## open port ssh tcp port 22 ##
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 22 -j ACCEPT
 
## open cups (printing service) udp/tcp port 631 for LAN users ##
iptables -A INPUT -s 192.168.1.0/24 -p udp -m udp --dport 631 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -p tcp -m tcp --dport 631 -j ACCEPT
 
## allow time sync via NTP for lan users (open udp port 123) ##
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 123 -j ACCEPT
 
## open tcp port 25 (smtp) for all ##
iptables -A INPUT -m state --state NEW -p tcp --dport 25 -j ACCEPT
 
# open dns server ports for all ##
iptables -A INPUT -m state --state NEW -p udp --dport 53 -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --dport 53 -j ACCEPT
 
## open http/https (Apache) server port to all ##
iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -m state --state NEW -p tcp --dport 443 -j ACCEPT
 
## open tcp port 110 (pop3) for all ##
iptables -A INPUT -m state --state NEW -p tcp --dport 110 -j ACCEPT
 
## open tcp port 143 (imap) for all ##
iptables -A INPUT -m state --state NEW -p tcp --dport 143 -j ACCEPT
 
## open access to Samba file server for lan users only ##
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 137 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 138 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
 
## open access to proxy server for lan users only ##
iptables -A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 3128 -j ACCEPT
 
## open access to mysql server for lan users only ##
iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
 

#20: Restrict the Number of Parallel Connections To a Server Per Client IP

You can use connlimit module to put such restrictions. To allow 3 ssh connections per client host, enter:
# iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 3 -j REJECT
Set HTTP requests to 20:
# iptables -p tcp --syn --dport 80 -m connlimit --connlimit-above 20 --connlimit-mask 24 -j DROP
Where,
  1. --connlimit-above 3 : Match if the number of existing connections is above 3.
  2. --connlimit-mask 24 : Group hosts using the prefix length. For IPv4, this must be a number between (including) 0 and 32.

#21: HowTO: Use iptables Like a Pro

For more information about iptables, please see the manual page by typing man iptables from the command line:
$ man iptables
You can see the help using the following syntax too:
# iptables -h
To see help with specific commands and targets, enter:
# iptables -j DROP -h

#21.1: Testing Your Firewall

Find out if ports are open or not, enter:
# netstat -tulpn
Find out if tcp port 80 open or not, enter:
# netstat -tulpn | grep :80
If port 80 is not open, start the Apache, enter:
# service httpd start
Make sure iptables allowing access to the port 80:
# iptables -L INPUT -v -n | grep 80
Otherwise open port 80 using the iptables for all users:
# iptables -A INPUT -m state --state NEW -p tcp --dport 80 -j ACCEPT
# service iptables save

Use the telnet command to see if firewall allows to connect to port 80:
$ telnet www.cyberciti.biz 80
Sample outputs:
Trying 75.126.153.206...
Connected to www.cyberciti.biz.
Escape character is '^]'.
^]
telnet> quit
Connection closed.
You can use nmap to probe your own server using the following syntax:
$ nmap -sS -p 80 www.cyberciti.biz
Sample outputs:
Starting Nmap 5.00 ( http://nmap.org ) at 2011-12-13 13:19 IST
Interesting ports on www.cyberciti.biz (75.126.153.206):
PORT STATE SERVICE
80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 1.00 seconds
I also recommend you install and use sniffer such as tcpdupm and ngrep to test your firewall settings.

Conclusion:

This post only list basic rules for new Linux users. You can create and build more complex rules. This requires good understanding of TCP/IP, Linux kernel tuning via sysctl.conf, and good knowledge of your own setup. Stay tuned for next topics:
  • Stateful packet inspection.
  • Using connection tracking helpers.
  • Network address translation.
  • Layer 2 filtering.
  • Firewall testing tools.
  • Dealing with VPNs, DNS, Web, Proxy, and other protocols.

Baca Selengkapnya ....

symbel pemutar musik

Posted by Unknown Jumat, 09 Desember 2011 0 komentar
adalah pemutar musik versi 1.0 dengan kosep multifungsi, didesain menyerupai handphone nokia
zaman dulu .diluncurkan pada desember 2011
software ini akan menentukan kelanjutan dari versinya sendiri, untuk awal hanya
akan menentukan rating sekitar 30% dan nantinya akan lebih dikembangkan lagi
kelebihan fitur ini antara lain, dapat berjalan disegala macam windows, ukuran yang kecil,
proses yang dibutuhkan sangat kecil dibandingkan penutar musik lain

kekuarngannya antara lain, fitur yang masih sangat sederhana dan belum tersedianya pengaturan untuk suara,
fitur kamera yang hanya dapat berjalan di produk acer.
over all, untuk yang hanya ingin mendengar musik dan mementingkan performa komputer, software inilah
yang paling tepat.

ini sekilas screenshotnnya




bagi yang minat silahkan download disini

Baca Selengkapnya ....

asal kata debug pada windows

Posted by Unknown Senin, 05 Desember 2011 0 komentar
debug berasal dari bhasa inggris "bug" yang bila diartikan dalam bahasa indonesia adalah"sarangga",sajerah
singkatnya seperti berikut:Tahun 1945, Grace Murray Hopper dan timnya sedang bekerja pada komputer kalkulator Relay Aiken Mark II University Hardvard. Lalu komputernya bermasalah. Setelah dicari penyebabnya, ternyata ada lebah pada Relay #70 di panel F. Lebah tersebut kemudian disingkirkan. nah, untuk debug sendiri merupakan istilah penanggulangan dari bug, yaitu proses perbaikan suatu program yang mengalami kerusakan atau jika memang tidak bisa diperbaiki maka komputer akan otomatis mematikan program tersebut.debug sendiri sering kita jumpai di task manager, atau apa bila ada program yang tidak berjalan semestinya , warning untuk debug akan muncul, karena yang dimaksud bug dalam komputer bukanlah serangga dalam arti yang sebenarnya, tapi merupakan kesalahan yang terjadi pada suatu program yang tidak berjalan semestinya karena suatu faktor, bisa saja karena salah penulisan script atau karena minimal spesifikasi yang tidak cocok.

Baca Selengkapnya ....

download lagu fosilband

Posted by Unknown Senin, 31 Oktober 2011 0 komentar

Baca Selengkapnya ....

tes kecepatan loading blog

Posted by Unknown Rabu, 17 Agustus 2011 0 komentar
tes kecepatan loading blog mu...

               TEST

Baca Selengkapnya ....

emulator gba dan game harvestmoon

Posted by Unknown Selasa, 16 Agustus 2011 0 komentar
klo yang gila game pasti taulah harvestmoon itu serunya kayak apa...dari pada download game harvestmoon yang untuk kompi, mending harvestmoon versi gba ya....hehhee promosi
langsung aja download, trus extrak filenya, buka vba.exe nya,pilih file-open-pilih file game harvestmoonnya...selesai deh

Baca Selengkapnya ....

aplikasi n gage

Posted by Unknown 0 komentar

sony ericsson Xperia Play

Posted by Unknown Minggu, 14 Agustus 2011 0 komentar

Sony Ericsson telah mengumumkan smartphone seri gaming Xperia Play di ajang Indonesia International Communication Expo and Conference (ICC) 2011
dan inilah fitur unggulan dari smartphone seri gaming Xperia Play
Tombol joy stick mirip pada Play Station. Xperia Play juga dilengkapi dengan kamera 5 megapixel, GPS, Bluetooht, dan microUSB.harganya saat ini masih kisaran antara 3-5 jt.namun dengan fitur game yang begitu hebat, wajar sajakan





Baca Selengkapnya ....

lirik lagu justin beiber (baby)

Posted by Unknown 0 komentar
(Ohh wooaahhh) x3

You know you love me
I know you care
Just shout whenever,
And I'll be there
You are my love
You are my heart
And we will never, ever, ever be apart


Are we an item?
Girl quit playing
We're just friends,
What are you saying?
Said there's another were look right in my eyes
My first love, broke my heart for the first time

And I was like
Baby, baby, baby ooh
Like baby, baby, baby noo
Like baby, baby, baby ohh
I thought you'd always be mine mine(2x)

Oh oh For you, I would have done whatever
And I just can't believe we ain't together
And I wanna play it cool
But I'm losin' you
I'll buy you anything
I'll buy you any ring
And now please say
Baby fix me
And just shake me till you wake me from this bad dream
I'm going down, down, down, down
And I just can't believe my first love won't be around

And I'm like
Baby, baby, baby ohh
Like baby, baby, baby noo
Like baby, baby, baby ohh
I thought you'd always be mine mine(2x)

(Luda)
When I was 13, I had my first love
There was nobody compared to my baby
And nobody came between us, no one could ever come above
She had me going crazy, oh I was star-struck,
She woke me up daily, don't need no Starbucks
She make my heart pound, I skip a beat when I see her in the street
And at school on the playground but I really wanna see her on the weekend
She knows she got me dazing cause she was so amazing
And now my heart is breaking but I just keep on saying...

Baby, baby, baby ohh
Like baby, baby, baby noo
Like baby, baby, baby ohh
I thought you'd always be mine mine(2x)

I'm gone
Yeahh, yeah, yeah
Yeahh, yeahhh
Now I'm all gone
Yeahh, yeah, yeah
Yeahh, yeahhh
Now I'm all gone
Yeahh, yeah, yeah
Yeahh, yeahhh
Now I'm all gone, gone, gone
I'm gone

Baca Selengkapnya ....

cafein : hidupkukan damaikan hatimu

Posted by Unknown Selasa, 19 Juli 2011 0 komentar
berjalan di tepi pantai
tertiup angin berhempus
sejukkan hati damaikan dirimu
melihat biru

bersama telah dilewati
bersama telah dijalani
aku di sini ’kan bersamamu
telah ikat janji

reff: hidupku kan damaikan hatimu
diriku kan selalu menjagamu
ijinkan ku selalu bersamamu
kasihku padamu
telah kuberikan semua
telah kurasakan bersama
sampai terhenti nafasku ini
hanyalah untukmu

Baca Selengkapnya ....

lirik lagu scorpion Under The Same Sun

Posted by Unknown Kamis, 23 Juni 2011 0 komentar
Scorpion - Under The Same Sun
I Saw The Morning
It Was Shattered By A Gun
Heard A Scream , Saw Him Fall, No One Cried
I Saw A Mother
She Was Praying For Her Son
Bring Him Back, Let Him Live, Don't Let Him Die

Bridge:
Do You Ever Ask Yourself
Is There A Heaven In The Sky
Why Can't We Get It Right

Chorus:
'cause We All Live Under The Same Sun
We All Walk Under The Same Moon
Then Why, Why Can't We Live As One

I Saw The Evening
Fading Shadows One By One
We Watch The Lamb, Lay Down To The Sacrifice
I Saw The Children
The Children Of The Sun
How They Wept, How They Blend, How They Died

Bridge:
Do You Ever Ask Yourself
Is There A Heaven In The Sky
Why Can't We Stop The Fight

Chorus:
'cause We All Live Under The Same Sun
We All Walk Under The Same Moon
Then Why, Why Can't We Live As One

Sometimes I Think I'm Going Mad
We're Loosing All We Had And No One Seems To Care
But In My Heart It Doesn't Change
We've Got To Rearrange And Bring Our World Some Love

Bridge:
And Does It Really Matter
If There's A Heaven Up Above
We Sure Could Use Some Love
Chorus:
'cause We All Live Under The Same Sun
We All Walk Under The Same Moon
Then Why, Why Can't We Live As One
'cause We All Live Under The Same Sky
We All Look Up At The Same Stars
Then Why, Why Can't We Live As One

Baca Selengkapnya ....

cara merubah lambang blog

Posted by Unknown Rabu, 22 Juni 2011 0 komentar
lambang blog diatas bisa diganti dengan gambar yang anda inginkan
dengan cara seperti dibawah ini
pertama buatlah gambar dengan format *.ico
atau masuk saja kesini 
dan masuk ke blog anda kemudian pilih rancangan dan edit html
masukkan kode di bawah ini diatas kode </head>
<link href='http://----------------' rel='SHORTCUT ICON'/>
*ganti ---------------- dengan url gambar icon anda kemudian simpan
selesai.

Baca Selengkapnya ....

lirik lagu tipe x selamat jalan

Posted by Unknown 0 komentar
 Am             
Terlalu lama engkau tergenang
  C
Hancurkan diri kian jauh tenggelam
 Am 
Lelah mencoba tuk lepaskan beban
  C                           G   F   Am
Kau beli mimpi semu tak berarti sendiri
  G             F          E
Tak mampu kau beranjak pergi

Interlude : Am C Am C

Am
Jalan yang panjang nanar kau tatap
  C
Tak lagi peduli semua yang terjadi
Am
Semakin dalam larut anganmu melayang
  C       
mimpimu hadirkan sebuah penantian
G            F                Am
Alunan hampa ajak kau bernyanyi
G              F             G
Akhirnya kau pun pergi tak kembali

Reff I : 
 C                    G            Dm
Banyak sudah kisah yang tertinggal
               Am           C
Kau buat jadi satu kenangan 
                  G           F         G
Seorang sahabat pergi tanpa tangis arungi mimpi
   C              G             Dm
Selamat kawan cepatlah berlabuh
                Am            C
Mimpimu kini telah kau dapati
              G                 F            G
Tak ada lagi seorangpun yang menganggu kau bernyanyi

Interlude : Em C Em C 2x
            G F Am G F E
            Am C 

 Am
Diam haruku hanya sanggup mengingat
 C
Jelas bayangmu yang masih melekat
Am
Dalam kecewa ku hanya mampu katakan
 C
Tetaplah tersenyum karena itu jalan
   G            F      Em
Yang telah engkau pilih
  G             F                 G
Terbanglah oh terbanglah bersama pelangi

Balik ke Reff I

Reff II :
   C                   G          Dm
Semoga dalam damaimu kau mengerti
                 Am              C
Arti gelapnya jalan yang kau daki
                   G
Hingga indahnya bias mentari
  F            G
Tak lagi kau nikmati
   C              G             Dm
Selamat kawan cepatlah berlabuh
                Am            C
Mimpimu kini telah kau dapati
              G                 F            G
Tak ada lagi seorangpun yang menganggu kau bernyanyi

Coda : Am C Am C

Baca Selengkapnya ....

download game n gage

Posted by Unknown Jumat, 17 Juni 2011 0 komentar


pengen maen game di n gage ??????
download aja game na disini



Baca Selengkapnya ....

lirik kekkaishi ending

Posted by Unknown Kamis, 16 Juni 2011 0 komentar
Minareta machi yukkuri fukenukeru kaze
Futari shite itsumo no PEESU de aruiteru
Fuzake atte waratta ato ni kizuita
Mita koto nai otonabita sono manazashi

Nani mo hanasanakutatte iiyo daijoubu
Kimochi wa kitto machigai janai

Tada massugu nanika ni tsuki susunde yuku
Anata wo ne tsuitsui ne mitsumete shimau

Soba ni ite mo hanarete mo
Dareka to dareka tsunagu...akai ito

Baca Selengkapnya ....

lirik lagu simple plan untitle

Posted by Unknown Sabtu, 04 Juni 2011 0 komentar
i open my eyes
I try to see but I'm blinded by the white light
I can't remember how
I can't remember why
I'm lying here tonight

And I can't stand the pain
And I can't make it go away
No I can't stand the pain

How could this happen to me
I've made my mistakes
I've got no where to run
The night goes on
As I'm fading away
I'm sick of this life
I just wanna scream
How could this happen to me

Everybody's screaming
I try to make a sound but no one hears me
I'm slipping off the edge
I'm hanging by a thread
I wanna start this over again

So I try to hold onto a time when nothing mattered
And I can't explain what happened
And I can't erase the things that I've done
No I can't

How could this happen to me
I've made my mistakes
I've got no where to run
The night goes on
As I'm fading away
I'm sick of this life
I just wanna scream
How could this happen to me

I've made my mistakes
I've got no where to run
The night goes on
As I'm fading away
I'm sick of this life
I just wanna scream
How could this happen to me


terjemahan



kubuka mataku
ku coba untuk melihat tapi aku dibutakan oleh cahaya putih
aku tak ingat bagaimana
aku tak ingat mengapa
Aku berbaring di sini malam ini

Dan aku tak tahan sakit
Dan aku tak bisa membuatnya pergi
Tidak, aku tidak tahan sakit

bagaimana mungkin ini terjadi padaku
aku telah berbuat kesalahan
tak ada tempat untuku berjalan
Malam terus
Saat aku mulai menghilang
Aku muak kehidupan ini
Aku hanya ingin berteriak
Bagaimana mungkin ini terjadi padaku

Semua orang berteriak
aku mencoba membuat suara tapi tidak ada yang mendengarku
Aku menyelinap dari tepi
Aku tergantung pada seutas benang
aku ingin memulai ini dari awal lagi

Jadi aku berupaya untuk tetap saat tak ada yang penting
Dan aku tidak bisa menjelaskan apa yang terjadi
Dan aku tidak bisa menghapus hal-hal yang aku lakukan
aku tak bisa

Bagaimana mungkin ini terjadi padaku
Saya telah membuat kesalahan saya
Saya tidak punya tempat untuk menjalankan
Malam terus
Saat aku mulai menghilang
Aku muak hidup ini
Aku hanya ingin berteriak
Bagaimana mungkin ini terjadi pada saya

Saya telah membuat kesalahan saya
Saya tidak punya tempat untuk menjalankan
Malam terus
Saat aku mulai menghilang
Aku muak hidup ini
Aku hanya ingin berteriak
Bagaimana mungkin ini terjadi pada saya

Baca Selengkapnya ....

pengertian virus dan antivirus

Posted by Unknown 0 komentar
PENGERTIAN VIRUS KOMPUTER

1. Pengertian Virus Komputer
Pertama kali istilah virus digunakan oleh fred Cohen pada tahun 1984 di Amerika Serikat karena adanya persamaan dasar dengan virus yang ada pada dunia kedokteran. Virus komputer adalah suatu program komputer yang menduplikasi atau menggandakan diri dengan menyisipkan kopian atau salinan dirinya ke dalam media penyimpanan / dokumen serta ke dalam jaringan secara diam-diam tanpa sepengetahuan pengguna komputer tersebut. Efek dari virus komputer sangat beragam mulai dari hanya muncul pesan-pesan aneh hingga merusak komputer serta menghapus file atau dokumen kita.
2. Pengertian Varian Virus Worm, Trojan Dan Spyware
a. Worm
Worm adalah lubang keamanan atau celah kelemahan pada komputer kita yang memungkinkan komputer kita terinfeksi virus tanpa harus eksekusi suatu file yang umumnya terjadi pada jaringan.

b. Trojan
Trojan adalah sebuah program yang memungkinkan komputer kita dikontrol orang lain melalui jaringan atau internet.

c. Spyware
Spyware adalah aplikasi yang membocorkan data informasi kebiasaan atau perilaku pengguna dalam menggunakan komputer ke pihak luar tanpa kita sadari. Biasanya digunakan oleh pihak pemasang iklan.Jika kita melihat kejanggalan pada media penyimpanan seperti file bernama aneh yang tidak pernah kita buat atau file bukan jenis aplikasi / application tetapi mengaku sebagai aplikasi maka jangan kita klik, kita buka atau kita jalankan agar virus komputer tersebut tidak menular ke komputer yang kita gunakan.

3. Ciri-Ciri Komputer yang Terinfeksi Virus:
- Komputer berjalan lambat dari normal
- Sering keluar pesan eror atau aneh-aneh
- Perubahan tampilan pada komputer
- Media penyimpanan seperti disket, flashdisk, dan sebagainya langsung mengkopi file aneh tanpa kita kopi ketika kita hubungkan ke komputer.
- Komputer suka restart sendiri atau crash ketika sedang berjalan.
- Suka muncul pesan atau tulisan aneh
- Komputer hang atau berhenti merespon kita.
- Harddisk tidak bisa diakses
- Printer dan perangkat lain tidak dapat dipakai walaupun tidak ada masalah hardware dan software driver.
- Sering ada menu atau kotak dialog yang error atau rusak.
- Hilangnya beberapa fungsi dasar komputer.
- Komputer berusaha menghubungkan diri dengan internet atau jaringan tanpa kita suruh.
- File yang kita simpan di komputer atau media penyimpanan hilang begitu saja atau disembunyikan virus. dan lain-lain...

4. Contoh bentuk media penyebaran virus komputer

- Media Penyimpanan (disket, flashdisk, harddisk eksternal, zipdisk, cd, dvd, bluray disc, cartridge, dan lain sebagainya)
- Jaringan lan, wan, man, internet dan lain sebagainya.
- File attachment atau file lampiran pada email atau pesan elektronik lainnya.
- File software (piranti lunak) yang ditunggangi virus komputer.
Cara yang paling ampuh agar kita tidak terkena virus komputer adalah dengan cara menginstall program komputer yang orisinil atau asli bukan bajakan yang tidak ditunggangi virus dan kawan-kawan, tidak menghubungkan komputer dengan jaringan atau internet, serta tidak pernah membuka atau mengeksekusi file yang berasal dari komputer lain.Tetapi cara seperti itu terlalu ekstrim dan kurang gaul dalam penggunaan komputer sehari-hari karena biasanya kita melakukan pertukaran data atau file dengan komputer lain baik berupa file pekerjaan, file gambar, file attachment, file musik, file video, dan lain sebagainya.Jadi untuk menghindari komputer kita diinfeksi dan terserang virus maka kita harus waspada dalam berinteraksi dengan file dari komputer lain, file dari media penyimpanan dari orang lain, attachment email, pertukaran file jaringan, lubang keamanan komputer kita, dan lain-lain. Pasang antivirus yang bagus yang di update secara berkala serta program firewall untuk jaringan dan anti spyware dan adware untuk menanggulangi jenis gangguan.


PENGERTIAN  ANTIVIRUS

Antivirus adalah sebuah jenis perangkat lunak yang digunakan untuk mendeteksi dan menghapus virus komputer dari sistem komputer. Disebut juga Virus Protection Software. Aplikasi ini dapat menentukan apakah sebuah sistem komputer telah terinfeksi dengan sebuah virus atau tidak. Umumnya, perangkat lunak ini berjalan di latar belakang (background) dan melakukan pemindaian terhadap semua berkas yang diakses (dibuka, dimodifikasi, atau ketika disimpan). Sebagian besar antivirus bekerja dengan beberapa metode seperti di bawah ini:

Pendeteksian dengan menggunakan basis data virus signature :
Cara kerja antivirus ini merupakan pendekatan yang banyak digunakan oleh antivirus tradisional, yang mencari tanda-tanda dari keberadaan dari virus dengan menggunakan sebagian kecil dari kode virus yang telah dianalisis oleh vendor antivirus, dan telah dikatalogisasi sesuai dengan jenisnya, ukurannya, daya hancurnya dan beberapa kategori lainnya.

Pendeteksian dengan melihat cara bagaimana virus bekerja:
Cara kerja antivirus seperti ini merupakan pendekatan yang baru yang dipinjam dari teknologi yang diterapkan dalam Intrusion Detection System (IDS). Cara ini sering disebut juga sebagai Behavior-blocking detection. Cara ini menggunakan policy (kebijakan) yang harus diterapkan untuk mendeteksi keberadaan sebuah virus. Jika ada kelakuan perangkat lunak yang “tidak wajar” menurut policy yang diterapkan, seperti halnya perangkat lunak yang mencoba untuk mengakses address book untuk mengirimkan e-mail secara massal terhadap daftar e-mail yang berada di dalam address book tersebut (cara ini sering digunakan oleh virus untuk menularkan virus melalui e-mail), maka antivirus akan menghentikan proses yang dilakukan oleh perangkat lunak tersebut. Kekurangannya, jelas karena antivirus memantau cara kerja perangkat lunak secara keseluruhan (bukan memantau berkas), maka seringnya antivirus membuat alarm palsu atau “False Alarm” (jika konfigurasi antivirus terlalu “keras”), atau bahkan mengizinkan virus untuk berkembangbiak di dalam sistem (jika konfigurasi antivirus terlalu “lunak”), terjadi false positive. Beberapa produsen menyebut teknik ini sebagai heuristic scanning.Antivirus yang menggunakan behavior-blocking detection ini masih sedikit jumlahnya, tapi di masa yang akan datang, kemungkinan besar semua antivirus akan menggunakan cara ini. Beberapa antivirus juga menggunakan dua metode di atas secara sekaligus

Macam-macam antivirus :
·         Avira
·         Ansav
·         Avast
·         Avg
·         Smadav
Dan masih banyak lagi.

Baca Selengkapnya ....

pasang menu slide diblog

Posted by Unknown Jumat, 03 Juni 2011 0 komentar



pasti tau dong tetang hal yang satu ini.....
ok langsung aja gak usah pake basa basi



pertama cari kode  ]]></b:skin>
kemudian copy kode dibawah ini dan letakkan diatas kode tadi



ul#menusisi {
position: fixed;
margin: 0px;
padding: 0px;
top: 50px;
left: 0px;
list-style: none;
z-index:9999;
}
ul#menusisi li {
width: 100px;
}
ul#menusisi li a {
display: block;
margin-left: -50px;
width: 100px;
height: 55px;
background-color:#141414;
background-repeat:no-repeat;
background-position:48px center;
border:1px solid #cfcfcf;
-moz-border-radius:0px 10px 10px 0px;
-webkit-border-bottom-right-radius: 10px;
-webkit-border-top-right-radius: 10px;
-khtml-border-bottom-right-radius: 10px;
-khtml-border-top-right-radius: 10px;
/*-moz-box-shadow: 0px 4px 3px #000;
-webkit-box-shadow: 0px 4px 3px #000;
*/
opacity: 0.8;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=80);
}
ul#menusisi .beranda a{
background-image: url(http://lh6.ggpht.com/_xcD4JK_dIjU/S9BJaBfhOhI/AAAAAAAAD_0/nV3ITEV9d3M/d/nav_home.png);
}
ul#menusisi .tentang a{
background-image: url(http://lh4.ggpht.com/_xcD4JK_dIjU/S9BJaX0yaqI/AAAAAAAAD_4/GZhfUKvK588/d/nav_info.png);
}
ul#menusisi .cari a{
background-image: url(http://lh3.ggpht.com/_xcD4JK_dIjU/S9BJejnwlAI/AAAAAAAAEAE/B_LZd63vGeI/d/nav_search.png);
}
ul#menusisi .komentar a{
background-image: url(http://lh3.ggpht.com/_xcD4JK_dIjU/S9BJaFyqDGI/AAAAAAAAD_w/pNO6TUSigBg/d/nav_comment.png);
}
ul#menusisi .rssfeed a{
background-image: url(http://lh3.ggpht.com/_xcD4JK_dIjU/S9BJaabJhzI/AAAAAAAAEAA/Oo4mhwCwzbI/d/nav_rss.png);
}
ul#menusisi .alat a{
background-image: url(http://lh3.ggpht.com/_xcD4JK_dIjU/S9BJelocqyI/AAAAAAAAEAI/6SmP-UHv-eg/d/nav_tools.png);
}
ul#menusisi .kontak a{
background-image: url(http://lh6.ggpht.com/_xcD4JK_dIjU/S9BJaVZkksI/AAAAAAAAD_8/g5fo6OKT5wE/d/nav_mail.png);

kedua, cari kode </head> dan copy script dibawah ini lalu letakkan di atas </head>


<script src='http://www.google.com/jsapi'/>
<script>
google.load(&quot;jquery&quot;, &quot;1.3.2&quot;);
</script>
<script type="text/javascript">
$(function() {
$('#menusisi a').stop().animate({'marginLeft':'-50px'},1000);
$('#menusisi > li').hover(
function () {
$('a',$(this)).stop().animate({'marginLeft':'-2px'},200);
},
function () {
$('a',$(this)).stop().animate({'marginLeft':'-50px'},200);
}
);
});
</script>

dan yang terakhir cari kode </body> dan copy kode dibawah ini lalu letakkan diatas </body>


<ul id='menusisi'>
<li class='beranda'><a href='LINKANDA' title='Beranda'></a></li>
<li class='tentang'><a href='LINKANDA' title='Tentang'></a></li>
<li class='cari'><a href='LINKANDA' title='Cari'></a></li>
<li class='alat'><a href='LINKANDA' title='Alat'></a></li>
<li class='rssfeed'><a href='LINKANDA' title='RSS Feed'></a></li>
<li class='komentar'><a href='LINKANDA' title='Komentar'></a></li>
<li class='kontak'><a href='LINKANDA' title='Kontak'></a></li>
</ul>


sumber : http://modification-blog.blogspot.com/2010/04/navigasi-efek-slide-out-dengan-jquery.html

(ganti *LINKANDA dengan alamat url milik anda. anda juga dapat mengganti 'beranda' dan lain-lain dengan kata-kata anda sendiri)
terima kasih, jika ada pertanyaan silakan komentar




Baca Selengkapnya ....

Camilla Belle

Posted by Unknown Rabu, 01 Juni 2011 0 komentar
Arti bernama asli Camilla Belle Routh ini lahir pada 2 oktober 1986 di los angeles, California , Amerika Serikat. Ia mulai terjun kedunia perfilman pada tahun 1993-sampai sekarang, film yang pernah dibintanginya adalah " When a Stranger Calls ". Yang menceritakan kisahnya menjadi pengasuh anak disebuah rumah mewah, kemudian ada seorang psikopat yang ingin membunuhnya. dengan perjuangan yang begitu melelahkan, akhirnya ia mampu menghentikan pelaku kejahatan itu.
   
 Ia tampil begitu menawan difilmnya yang berjudul " The Quiet " ,menceritakan seorang anak yang kehilangan kedua orang tuanya, kemudian ia diasuh oleh salah satu keluarga kerabat ayahnya. dot namanya, ia berpura-pura kehilangan pedengaranya karena ia merasa akan lebih dekat dengan almarhum ayahnya jika ia melakukan hal itu.


beberapa film yang pernah dibintanginya antara lain :

TahunJudulSebagaiCatatan
1995A Little PrincessJane
1996Poison Ivy IIDaphna Falk
Marshal LawBoots
1997The Lost World: Jurassic ParkCathy Bowman
1998The PatriotHolly McClaren
Practical MagicYoung Sally Owens
1999Secret of the AndesDiana Willings
2000Rip GirlsSydney MillerA Disney Channel Movie
2001The Invisible CircusPhoebe, age 10-12
Back to the Secret GardenLizzy Buscanadirect-to-video
2005The Ballad of Jack and RoseRose Slavinlimited release
The ChumscrubberCrystal Fallslimited release
The QuietDotlimited release
2006When a Strangers CallsJill Johnson
2007The TrapHermia
200810,000 BCEvolet
PushAlyssa Englishpost-production
2009Wicked: WitchNicole Cathers-Andersonpre-production
(sumber : http://id.wikipedia.org/wiki/Camilla_Belle)
danfilm terbarunya adalah " From Prada To Nada "

Baca Selengkapnya ....
Trik SEO Terbaru support Online Shop Baju Wanita - Original design by Bamz | Copyright of android japan.