how to open port 80 in linux iptables

Here we have linux tutorial for, how to open port 80 in linux iptables. Many times we need to open 80 port on linux box. Through command line opening the 80 or any port that is easy. In this tutorial I will how you can open the port 80.

how to open port 80 in linux iptables

how to open port 80 in linux iptables
how to open port 80 in linux iptables

Using following you can check the firewall setting of Linux.


[root@sonyk-pc project]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http state NEW
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:vnc-server
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:vnc-server
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:patrol-snmp state NEW
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:61613 state NEW
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Using following command you can open the port 80. using following command use 80 port will be open for 192.168.2.0 to 192.168.2.68 ip addresses.


[root@sonyk-pc project]# iptables -A INPUT -s 192.168.2.0/68 -d 192.168.2.16 -p tcp --dport 80 -j ACCEPT

using following command you can save the setting in iptables.


[root@sonyk-pc project]# restorecon -R /etc/sysconfig/iptables

[root@sonyk-pc project]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

Than restart the firewall using following command

[root@sonyk-pc project]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: nat mangle filte[  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules: Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
 [  OK  ]

how to add adsense to wordpress blog

Many people wants to put ads on their wordpress blog because you can earn money from it. In this post we are going to show you step by step that how to add adsense in your wordpress site which is very simple. In article we shown steps for, how to add adsense to wordpress blog which is simple. Without code change you add google adsense in wordpress blog or website.

You might useful our another article of how many google ads you can show on single webpage. Hope you’ll find useful.

how to add adsense to wordpress blog

Lets get started.

  • Step 1: Login to your administrative and click on the Appearance menu which is on left side. When you will click on Appearance it will show you dropdown list, in that list you have to click on Widgets menu.

: Appearance >> Widgets

how to add adsense to wordpress blog
how to add adsense to wordpress blog

 

  • Step 2: Now choose a ” Text ” Widget and simply drag it in your Sidebar.
how to add adsense to wordpress blog
how to add adsense to wordpress blog
  • Step 3: Now a new window of your Text Widget will open. According to us you should add Advertisement for title and put the actual code that you have obtained from google under the title. Finally click on Save button which is on bottom right of window.

 

how to add adsense to wordpress blog
how to add adsense to wordpress blog

 

Well done! You have added adsense code in your wordpress blog.

set post excerpt length to limited characters in wordpress

In wordpress 3.0 limiting the excerpt is very easy. the_excerpt function is very useful and helpful in wordpress. In wordpress limiting the excerpt is very easy. With our code you can set post excerpt length to limited characters in wordpress. the_excerpt function is very useful and helpful in wordpress.

set post excerpt length to limited characters in wordpress

set post excerpt length to limited characters in wordpress
set post excerpt length to limited characters in wordpress

In many wordpress theme we used the excerpt. Many times we need to control excerpt characters as per our wordpress theme requirement. You can easily change the excerpt length using wordpress hook.

You just need to open your functions.php file from your wordpress theme folder and put following code in that.

function change_excerpt_length($length) {
    return 100;
}
add_filter('excerpt_length', 'change_excerpt_length');

This filter is used by wp_trim_excerpt() function. By default the excerpt length is set to return 55 words.

best free premium wordpress themes for download

In article, we have a list of best free premium wordpress themes for download which are available free download. searching for free premium wordpress themes. Everybody was searching for free premium wordpress themes for download. Many people thought there are very nice wordpress themes but that are not freely available. Here in this article I created a list of premium wordpress themes which are available for free download.

best free premium wordpress themes for download

Artwork WordPress Theme

best free premium wordpress themes for download
best free premium wordpress themes for download

Download

Mimbo Magazine

Preview | Download

A Better Place

Demo | Download

Brandford Magazine

Preview | Download

Bulletin Board WordPress Theme

Download

Movie Theater WordPress Theme

Download

Children And Toys WordPress Theme

Download

WP-Polaroid

Preview | Download

Coda

Demo | Download

Motion Theme

Demo | Download

The Morning After Theme

Demo | Download

register activation hook using in wordpress plugin

wordpress hooks are very important for wp developers. We can use the wp hooks in wordpress plugin and themes. Here in this article I will show you how to register the hook in wordpress plugin. I given the simple code sample which will give you the fare idea about using the wordpress hooks.

register activation hook using in wordpress plugin

register activation hook using in wordpress plugin
register activation hook using in wordpress plugin

register_activation_hook is very important function for creating the wordpress plugin. The function register_activation_hook registers a plugin function to be run when the plugin is activated.
You can use the register_activation_hook as follows:

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php register_activation_hook($file, $function); ?>

If you can going to create the wordpress simple plugin then this function is very useful. this function you can use as follows in files.
If you have a function called myplugin_activate() in the main plugin file at either

* wp-content/plugins/myplugin.php or
* wp-content/plugins/myplugin/myplugin.php

you can use code as follows:

global $myvar;
$myvar='whatever';

function myplugin_activate() {
  global $myvar;
  echo $myvar; // this will be 'whatever'
}

register_activation_hook( __FILE__, 'myplugin_activate' );

1. register_activation_hook() must be called from the main plugin file – the one that has “Plugin Name: …” directive.
2. Your hook function must be in the same file as well. From that function it is ok to call other functions defined in other files.
3. Doing echo “My hook called!”; – does not work from it. So this is not a good way to judge whether it working or not.
4. Your global variables must be explicitly declared as global for them to be accessed from inside of my_activation_hook().

Check the sample wordpress plugin code.

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php
/*
Plugin Name: A Test
Description: A Test
*/

require_once (dirname(__FILE__) . '/my_other_file.php');

// This code *will not* work. Activation hook function must be defined in the main plugin file.
//    register_activation_hook (dirname(__FILE__) . '/my_other_file.php', 'my_other_function');

// This code will work.
register_activation_hook (__FILE__, 'test_activated');

// This is correct way to declare/access globals.
global $some_var;    // globals must be declared explicitly. Without this you will not be able to access '$some_var' from within 'test_activated()' function.
$some_var = 'hey';

//===========================================================================
function test_activated ()
{
   global $some_var; // Now it will be 'hey'.

   // This function is defined in 'my_other_file.php'
   my_other_function ();

   // This will not work, so don't try. If you need logging write something in temporary log file in here via fopen/fwrite.
	// If you want to quickly test if your activation hook works - put exit() into it. At least you'll see error during activation.
   echo 'test_activated called!';
}
//===========================================================================

?>

The function register_deactivation_hook registers a plugin function to be run when the plugin is deactivated.
following function will deactivate your plugin

register_deactivation_hook( __FILE__, 'myplugin_deactivate' );

wordpress theme help for wordpress developers

Many People want to create the wordpress theme. But they don’t know where to start and how to start. We given wordpress theme help for wordpress developers. For creating the wordpress theme only two files are important. First file is style.css file and index.php file if you create that only two files in your wordpress theme folder than also you can able to create the wordpress theme easily.

wordpress theme help for wordpress developers

Here I will show you which is necessary files in wordpress theme folder.

header.php - header section
index.php - main section
sidebar.php - sidebar section
footer.php - footer section
single.php - post template
page.php - page template
comments.php - comments template
search.php - search content
searchform.php - search form
archive.php - archive
functions.php - special functions
404.php - error page

If you have very basic knowledge of php then you are able to create Above files very easily. In index.php file you need the PHP loop for showing the wordpress posts.

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php if(have_posts()) : ?>
   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php while(have_posts()) : the_post(); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_title(); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_content(__('(more...)')); ?>
// Custom HTML & PHP code
   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endwhile; ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php else : ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endif; ?>

Using above code you can show the wordpress posts in your wordpress theme. Just you need to put above code in right place where you want to show the multiple posts.

Then Cut the header part of index.php file and put in header.php file and put < ?php get_header(); ?>
instead of deleted header part.

Then Cut the sidebar part of index.php file and put in sidebar.php file and put < ?php get_sidebar(); ?>
instead of deleted sidebar part.

Then Cut the footer part of index.php file and put in footer.php file and put < ?php get_footer(); ?>
instead of deleted footer part.

In single.php file you need to copy paste the index.php file and then put following code in the loop for showing the comments.

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php if(have_posts()) : ?>
   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php while(have_posts()) : the_post(); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_title(); ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php the_content(__('(more...)')); ?>
// Custom HTML & PHP code
   <!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endwhile;
comments_template();
?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php else : ?>
<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php endif; ?>

Above tags we called as template tags in wordpress api and themes.
In header.php file following lines or code is important. For title, description for blog home, theme url following code is useful. Following tags we called as “Template Bloginfo Tags”.
Where you want to show the title use following code.

< ?php bloginfo('name'); ?> - Title of the blog
< ?php bloginfo('charset'); ?> - Displays the character set
< ?php bloginfo('description'); ?> - Displays the description of the blog
< ?php bloginfo('url'); ?> - Displays the address of the blog
< ?php bloginfo('rss2_url'); ?> - Displays the RSS URL
< ?php bloginfo('template_url'); ?> - Displays the URL of the template
< ?php bloginfo('pingback_url'); ?> - Displays the pingback URL
< ?php bloginfo('stylesheet_url'); ?> - Displays the URL for the template's CSS file
< ?php bloginfo('wpurl'); ?> - Displays URL for WordPress installation
< ?php bloginfo('name'); ?>

Common and very useful wordpress theme tags as follows.

< ?php the_time() ?> - Displays the time of the current post
< ?php the_date() ?> - Displays the date of a post or set of posts
< ?php the_title(); ?> - Displays or returns the title of the current post
< ?php the_permalink() ?> - Displays the URL for the permalink
< ?php the_category() ?> - Displays the category of a post
< ?php the_author(); ?> - Displays the author of the post
< ?php the_ID(); ?> - Displays the numeric ID of the current post
< ?php wp_list_pages(); ?> - Displays all the pages
< ?php wp_tag_cloud(); ?> - Displays a tag cloud
< ?php wp_list_cats(); ?> - Displays the categories
< ?php get_calendar(); ?> - Displays the calendar
< ?php wp_get_archives() ?> - Displays a date-based archives list
< ?php posts_nav_link(); ?> - Displays Previous page and Next Page links
< ?php next_post_link() ?> - Displays Newer Posts link
< ?php previous_post_link() ?> - Displays previous link

With this article I attached the very useful wordpress 3.0 help functions list. Please download that also.

WordPress 3.0 Cheat Sheet wordpress theme help for wordpress developers
wordpress functions and theme help wordpress theme help for wordpress developers

free fresh and high quality wordpress themes for bloggers

Here in this article we collected, free fresh and high quality wordpress themes for bloggers. As blogger we need very high quality unique wordpress themes.

We all knows that every blogger searches creative and effective theme to attract the visitors. That’s true that theme of your site is also important thing to increase blog traffic. According to us theme must be user-friendly that when people will come on your site then they will find any stuffs quickly and without headache.

There are a lot of websites providing fresh and high quality themes on the net. Here in this post we have selected some outstanding themes for bloggers. Hope you’ll like these wonderful themes, you can tell us which one you like through your comments.

free fresh and high quality wordpress themes for bloggers

Thank You.

1: Zanblue

free fresh and high quality wordpress themes for bloggers
free fresh and high quality wordpress themes for bloggers

[ Demo | Download ]

…………………………………………………………………..

2: Darina

free fresh and high quality wordpress themes for bloggers

[ Demo | Download ]

…………………………………………………………………..

3: Simple Balance 2.0

free fresh and high quality wordpress themes for bloggers

[ Demo | Download ]

…………………………………………………………………..

4: Art Imagination

[ Demo | Download ]

…………………………………………………………………..

5: ZIG ZAG

[ Demo | Download ]

…………………………………………………………………..

6: CreativeArt Theme

[ Demo | Download ]

…………………………………………………………………..

7: UrbanArtist

[ Demo | Download ]

…………………………………………………………………..

8: ASTRA

640

[ Demo | Download ]

…………………………………………………………………..

9: ZinePress

[ Demo | Download ]

…………………………………………………………………..

10: Keep it Simple

[ Demo | Download ]

…………………………………………………………………..

11: Outdoor

[ Demo | Download ]

…………………………………………………………………..

12: Velux

[ Demo | Download ]

…………………………………………………………………..

13: Magiting

[ Demo | Download ]

…………………………………………………………………..

14: Japanese Fleur

[ Demo | Download ]

…………………………………………………………………..

15: Foodiary

[ Demo | Download ]

…………………………………………………………………..

16: Aspire

[ Demo | Download ]

…………………………………………………………………..

17: Pork and Beans

[ Demo | Download ]

…………………………………………………………………..

18: Brownline

[ Demo | Download ]

…………………………………………………………………..

19: INDEZINER

[ Demo | Download ]

…………………………………………………………………..

20: Toughpress

[ Demo | Download ]

…………………………………………………………………..

21: Smashing MultiMedia

[ Demo | Download ]

…………………………………………………………………..

22: Magzeen

[ Demo | Download ]

…………………………………………………………………..

23: Torn Paper

[ Demo | Download ]

…………………………………………………………………..

How do I get wordpress API Key

Many people are running there site with wordpress. For many reasons We need to WordPress api key. For using the wordpress stat and akismet plugin we need the wordpress api key. In this article we given details for get wordpress API Key

How do I get wordpress API Key

How to get the free wordpress api key?

Go to following URL:

http://akismet.com/personal/

How do I get wordpress API Key
How do I get wordpress API Key

Put your email address and click on register button.

How do I get wordpress API Key
How do I get wordpress API Key

Click on use Akismet for free! Link. Than fill all your information in the form and hit the Next button.

After submission you will see the following message.

You will get the wordpress api through wordpress in following format.

Thanks for choosing Akismet.

Your Akismet API key is: ------------

If you have any questions or concerns about your Akismet subscription, don't hesitate to ask:

http://akismet.com/contact/

Thanks,
The Akismet team.

free wordpress themes for hotels and resorts, restaurants and travel

In Hotel site you need to add many images and media and reviews about customer. we have unique free wordpress themes for hotels and resorts.

free wordpress themes for hotels and resorts

Biggest to smallest hotel and restaurant required the website now. Wordpres is best and perfect solution for this. In Hotel site you need to add many images and media and reviews about customer. In wordpress creating the hotel or restaurant site is very nice and easy. There are too many free wordpress themes which can be usable for creating hotel site with wordpress. In this article I am going to give very nice options about free wordpress themes for hotels or Restaurants.

Hotels WordPress Theme

free wordpress themes for hotels and resorts
In Hotel site you need to add many images and media and reviews about customer. we have unique free wordpress themes for hotels and resorts.

Demo | Download

DeLuxe

Demo | Download

Hotel

Demo | Download

Hotel Lobby

Demo | Download

SW Hotel

Demo| Download

Hotel Nights

Demo | Download

Golden Palace Hotel Theme

Demo | Download



WordPress themes for Beer Bars and Drinks

WordPress became popular in last few year. The best part of wordpress the great SEO tool. That’s why many people want to create their website using wordpress. It is fast and highly customizable.

Free WordPress themes for Beer Bars and Drinks

Here I am going to give some cool wordpress themes for Beer Bars and Drinks collection. It is free wp themes for beer bars. You can find many free wordpress themes which can be useful for beear bars and hotels. Following list is unique and carefully collected wp themes. If you use these themes then you can easily customize them as per your requirements.

We did used some these themes for our clients and after few customization and adding new content and images, It was looking so nice and great. You should try these themes. If you are looking for beer bars wordpress themes.

1. Red Wine

Wordpress themes for Beer Bars and Drinks
WordPress themes for Beer Bars and Drinks

Demo | Download

2. Wine Clean

Demo | Download

3. Unwind

Demo | Download

4. Darkred

Demo | Download

5. New-wine

Demo | Download