Ubuntu Update Manager

How to Setup a Virtual Web Server in 10 Minutes

TAGS: None

This article will walk the reader through a few simple steps on how to setup a virtual web server in 10 minutes.  The steps outlined here describe how to install Apache Web Server with the MySQL Database, PHP, & Perl.  This is a tutorial on how to setup a virtual web server on the Apple Macbook Pro, but the same steps apply for a Microsoft Windows computer with a few simple modifications.

The Apple Macbook Pro OS X already comes bundled with a web server.  This Mac OS X web server can be enabled by following the steps outlined in this article, “How to set up a Web Server in Mac OS X Leopard“.

This tutorial will show how to install and configure a virtual web server for web development that can be removed at will.  Web developers experimenting with cutting edge technologies and custom configurations usually need multiple environments.

Please use caution when installing new software on computer systems.  A Best Practice includes creating system backups before changes.

1. How to Install Open Source Software

The good people at Apache Friends have made this step extremely easy.  People can download an Apache distribution containing MySQL, PHP and Perl in the XAMPPpackage.  Download and install XAMPP by following the steps defined athttp://www.apachefriends.org/en/xampp.html

2. Edit the Local Host File

sudo nano /private/etc/hosts

The entries in this file start with something like this:

# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost

add the new server name to the bottom of the list here

127.0.0.1 virtualserver1.dev

Press control-o to save the file, then enter, and control-x to exit the editor.
Flush the DNS Cache to activate changes

dscacheutil -flushcache

3. Update the Virtual Host File

sudo nano /Applications/xampp/etc/extra/httpd-vhosts.conf

This file will look very similar to the text below. Delete everything in this file and add the virtual host information.

    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
    ServerName dummy-host.example.com
    ServerAlias www.dummy-host.example.com
    ErrorLog "logs/dummy-host.example.com-error_log"
    CustomLog "logs/dummy-host.example.com-access_log" common

New Virtual Host File

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Virtual Hosts
#
# If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
#
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
# Use name-based virtual hosting.
#
NameVirtualHost 127.0.0.1
    ServerAdmin webmaster@virtualserver1.dev
    DocumentRoot "/projects/virtualserver1/docs/public_html"
    ServerName virtualserver1.dev
    ServerAlias www.virtualserver1.dev
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
    ErrorLog "logs/virtualserver1-error_log"
    #Don't really need a log file for a local web server
    #CustomLog "logs/webtechman.dev-access_log" common

4. Update the HTTPD Config File

sudo nano /Applications/XAMPP/xamppfiles/etc/httpd.conf

Remove the comment from #Include /Applications/xampp/etc/extra/httpd-vhosts.conf
Original line

#Include /Applications/xampp/etc/extra/httpd-vhosts.conf

Updated line

Include /Applications/xampp/etc/extra/httpd-vhosts.conf

Create a test file for the “Document Root” folder identified in the new virtual host and save it as “index.php”.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <meta http-equiv="Content-Style-Type" content="text/css">
 <title></title>
 <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
 </style>
</head>
<body>
<h1>Hello</h1>
<h2><?php echo "World"; ?></h2>
</body>
</html>

5. Viewing The Virtual Environment

Navigate to “/Applications/XAMPP” and run XAMPP Control

Start the database and web server from the XAMPP Control

Open a web browser and navigate to http://localhost and see the default XAMPP page.

Open a web browser and navigate to http://localhost/phpmyadmin/ and see the MYSQL database manager.

Open a web browser and navigate to http://virtualserver1.dev/index.php and see the test page from the new virtual web server.

Adding Additional Virtual Web Servers

Additional virtual web servers can be created by repeating steps 2 & 3.  The new virtual web servers will need unique names, for example: “virtualserver2″, “virtualserver3″, “virtualserver4″, or “mydevserver”.

Fixing MySQL error 13 on Mac OS X 10.6.x: This error usually occurs when the curly quotes are used in the configuration files, which happens when copying and pasting code from the web.  This error can be fixed by changing these “HTML quotes” to normal “quotes”.

Summary

Setting up virtual web servers in the development environment is a very simple task.  Local instances of web server software allows web developers to experiment with features of web applications like WordPress blog software.  The new features can be tested locally before implemented in a production environment.  Each of these virtual environments can be configured to meet custom needs.  Learn more about Apache Web Server Name-based Virtual Hosting here.

Note: The “Document Root” is outside of the web server software installation, which allows replacing the current web server software with something like “Zend Server” without disrupting current web site files.

 

 

You may interested in

VN:F [1.9.14_1148]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.14_1148]
Rating: +1 (from 1 vote)

How to share Mac internet with Xbox

Tags:

How to share Mac internet with Xbox
If, like me, you have your Xbox 360 placed near your wifi-enabled computer, but away from your wireless router or modem, then you’ll want to take advantage of the Xbox’s ability to “borrow” your computer’s internet connection. For Windows users, this process is simple; it’s just a matter of “bridging” your computer’s wifi connection to your PC’s ethernet port which is plugged into your Xbox. For Mac users, the process ain’t so easy. What follows is a guide for getting your Xbox 360 to accept Mac OS X’s internet sharing option.

How to share Mac internet with Xbox

Before you start configuring, open up Terminal (in Applications -> Utilities) and type “ifconfig en0″ (zero, not a capital-o). You’re looking for the bit that says “inet xxx.xxx.xxx.xxx”. In my case, the number I get here is 192.168.2.1 Second, note down the IP address of your wireless router, which in my case is 192.168.0.1

On your Mac

  1. Connect your Mac to your wireless internet connection
  2. Connect your Xbox 360 to your Mac via Ethernet
  3. In System Preferences -> Sharing, enable Internet Sharing between your Airport and Ethernet connection

On your Xbox 360

  1. Start up your Xbox and navigate to the Network settings menu
  2. Under IP address, enter the number you got from the “ifconfig en0″ command earlier on, but with the final number one place higher. In my case, I take the 192.168.2.1, and input 192.168.2.2 in the IP address box on my Xbox 360.
  3. Under subnet, input 255.255.255.0
  4. Under router/gateway, enter the number you got earlier from the “ifconfig en0″ command. In my case, that’s “192.168.2.1″
  5. Move onto DNS. Enter the IP address of your wireless router (in my case, “192.168.0.1″) in both the primary and secondary IP address fields
  6. Leave PPPoE and Advanced settings blank (i.e. OFF and Automatic)
  7. You should now be able to connect to Xbox Live via your internet sharing Mac

If you manage to get this method, or a similar method working, don’t forget to drop by the comments thread to record your experience!

You’re in a hotel that charges $15 per client for Internet access and there are three of you using notebooks. What to do? Pay $45″”about what fast residential broadband costs per month””or find a way to share the wealth (bits are after all free)?

Well you being the clever lass (or lad) with the MacBook quickly tethers via Ethernet and then smoothly shares the connection wirelessly with your two hapless counterparts, saving the company money and earning a special spot in your boss’s black, money-grubbing heart.

1. Go to System Preferences, and then click “Sharing.”

2. Select “Internet Sharing”
“” Do NOT click the “On” checkbox just yet as you won’t be able to change any settings

3. Choose a network service from the “œShare your connection from” pop-up menu, select “Ethernet.”

4. Select a way to share your Internet connection from the “œTo computers using” list, click “AirPort.”

5. Click Airport Options and choose a password to protect your connection (irony intended)
“” A five character password yields 40-bit protection, 13 characters gives you 128-bit

6. Click the Internet Sharing “On” checkbox to begin the connection, and you should be good to go.

Read more articles related to How to share Mac internet with Xbox

*How to share Mac internet with Xbox
* Enable native NTFS read/write support
* How to Mount NTFS Drives on Mac OS X with Read/Write Access
* Howto: OpenVPN Server and OSX Client

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

How To Share The Internet Connection Between Mac and PC via Wifi

Tags:

How To Share The Internet ConnectionHere’s the scenario that brought me to write this article: the ISP I’ve signed up with decided to temporarily block the internet connectivity in our area. Where I live, it’s actually possible — things like these do happen without reason. Because of that, Mark O’Neill suggested purchasing a UMTS device that would allow me to go online just about anywhere with reception. So I did. It costed me quite a bit but I thought it would be worth the money.

Now, here’s the tricky part. In my home network, we have 2 Macs and one PC running on Windows XP. The UMTS device connects via USB. How do we decide who gets to use it? We put our thinking caps on and finally decided that it would be easier to share the internet connection using one of the Macs. I rolled up my sleeves and got to work.

Internet sharing between Macs is basically very easy but if you add a Windows PC into the mix, things get a little problematic. Sharing the internet connection between Mac and PC turned out to be harder than I thought. I’ll explain why in a minute. But first, let’s just assume that we only needed to share the connection between 2 (or more) Macs via AirPort (WiFi). It’s very simple.

Lets see quicky on How To Share The Internet Connection

Open System Preferences and click on Sharing.

Before Internet Sharing can be enabled, you first have to configure the proper settings.

share internet connection between mac and pc

In the ‘Share your connection from’ dropdown list, select the port that has internet connectivity. In the screenshot above, I have “Ethernet” selected when it actually should be USB — ignore that. Then select how you would like to share the connectivity. I chose AirPort so that I can share the connection with several other computers. Checking the box next to ‘AirPort’ unbricks the ‘Airport options’ button.

Click on that button and configure your network name and security options.

share internet connection between mac pc

Alright, here’s where the whole Windows and Mac concoction starts to rear its ugly head. Due to the different methods that the two operating systems deals with Hex encryption, the password you enter here will not be easily accepted by Windows. A Windows PC will be able to detect the wireless network but it will not be able to join.

Here’s the workaround. Select the 128-bit WEP encryption option and enter a 13-character password. Then, rename the network to something really short without spaces. When you’re done, hit OK.

Now you can check the box next to ‘Internet Sharing’. You may get a prompt to start AirPort, click Start. Right, the connection is shared. Macs detect the network automatically (and so will iPhones and iPod touches) and will connect to it as though it’s a regular router.

On the Windows PC, a little bit of manipulation is required. Turn on the wireless adapter and right-click on its taskbar icon to select “View available wireless networks”. In the subsequent window, click on “Change advanced settings”.

Click on the Wireless Networks tab and then click the ‘Add’ button to add our shared network.

how to share internet connection between two computers

Print the network name accurately, then set the network authentication to ‘Shared’, data encryption to ‘WEP’, uncheck the box next to “This key is provided for me automatically” and enter the 13-character password.

how to share internet connection between two laptops

Click on the Authentication tab and disable IEEE 802.1x authentication. Next, click on the Connection tab and make sure that it will connect when in range. Click OK and apply the settings.

It should now try to connect to the shared AirPort connection. Cross your fingers. This sort of busts the myth that Macs and Windows won’t work well together, doesn’t it?

I noted a few oddities during the whole procedure: 40-bit WEP encryption didn’t work when trying to share the internet connection between Macs and PC. The password was always incorrect. Then I changed it to 128-bit and everything was well. Also, the network name must not contain any spaces. The Windows PC wouldn’t connect to “Jackson Chung’s MacBook” but it connected with “jxn”.

How would you go about this procedure from a Window’s point of view? I would love to hear it. Tell me how — in the comments!

Read more articles related to How To Share The Internet Connection

*How To Share The Internet Connection
* Enable native NTFS read/write support
* How to Mount NTFS Drives on Mac OS X with Read/Write Access
* Howto: OpenVPN Server and OSX Client

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Mac Internet Sharing (with Xbox 360)

Tags:

Mac Internet SharingA very hidden and somewhat unused feature of Mac OS X is the internet sharing application which can be found in System Preferences > Sharing > Internet Sharing.  This feature is very basic and easy to setup but it allows you to share the incoming internet connection on your Mac with other computers in your vicinity.  You can even turn your Mac into a wireless hub using this feature.  We’ll help show you how to set this up properly in this guide, along with a step by step tutorial of how to use your Mac’s internet connection in order to get your Xbox 360 online without having to purchase a wireless adapter.

How to make Mac Internet Sharing by easiest way ?

The first step is getting familiar with Internet Sharing.  As mentioned above, you need to navigate to System Preferences > Sharing > Internet Sharing (which is an option listed on the left).  Once on the Internet Sharing option page, you need to setup exactly what you want to do before you proceed to turn it on.  As you can see, you need to select where you want the shared connection to come from and then where you are going to output it.  So, if you want to turn your Mac into a wireless hub, you would select “Share your connection from: Ethernet”…”To computer using: Airport”.  You can mess around with any configuration here including Airport to Ethernet, Bluetooth to Ethernet, etc.  In order to enable it, you must click the check box next to internet sharing.  You can now turn your Mac into any sort of internet hub that you want it to be.  This works great when you are somewhere such as a hotel which might only have one Ethernet plug but you have 4 laptops.  You can create a wireless hub for everyone else in the room to connect to.

One of my favorite uses for this feature is sharing my MacBook’s Airport connection with my Xbox 360 through an Ethernet connection.  I have been doing this for years, and it has saved me the $100 I would have had to spend on a wireless adapter for my 360.  Here is a step by step guide on how to setup your Xbox 360 to share an internet connection with your Mac:

1. Enable internet sharing as described above in System Preferences.  You will want to select sharing from Airport to Ethernet.

2. Connect your Mac to your Xbox 360 using an Ethernet cable.

3. Open up Terminal on your Mac by going to Applications > Utilities.

4. In terminal type “ifconfig en0″ (that is a zero)

5. In the terminal screen, you need to look for the line which displays as “inet xxx.xxx.xxx.xxx”.  Write this number down.  For example, mine is currently 192.168.2.1

6. Also get the IP Address of your wireless router.  This can be found in System Preferences > Network> Select Airport > Advanced> TCP/IP Tab > Router.  Write this number down.  Mine was 10.0.1.1

7. Start your Xbox and get to the Network Settings menu.  You will now have to put some numbers in manually…

8. For IP Address you need to enter the inet number you found in your terminal but with the last number being 1 digit higher.  For instance, mine would be 192.168.2.2

9. For Subnet, enter 255.255.255.0

10. For Router/Gateway enter the inet number from earlier.  Mine was 192.168.2.1

11. For DNS (both primary and secondary) enter the IP of your router.  Mine was 10.0.1.1

12. You need to leave PPPoE and advanced settings blank (default was off and automatic).

13. Test the connection and enjoy having a shared internet connection to your Xbox from your Mac.

If you need any help with this, please leave a comment and I’ll get back to you.

Read more articles related to Mac Internet Sharing

* Mac Internet Sharing
* Enable native NTFS read/write support
* How to Mount NTFS Drives on Mac OS X with Read/Write Access
* Howto: OpenVPN Server and OSX Client

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

SMS Gateway How-To

Tags:

This how-to will cover how to set up an SMS (Short Message Service) gateway using your own hardware and software. The intended audience is people that are reasonably comfortable with Linux/Unix and some type of scripting language.

Disclaimer: Use these instructions at your own risk. I assume no responsibility for any damage resulting from information contained in this guide.

The following documentation describes how I have set up my own system which has been running for over 6 months and sent tens of thousands of messages. The server has not suffered from any downtime at all.

I have been working with SMS systems for several years now and I have used 3rd party providers and have used both commercial and open source tools. Below documents how to go about building a completely open source system that can be run with relatively inexpensive hardware and free software.

For some people 3rd party solutions may be the best option as some of them offer competitive deals and very sophisticated services. I’m also sure that there are numerous commercial solutions that could offer the same results, I however prefer to use open source. For some individuals, this may not be the best solution, for others, it is the only way to get the flexibility and control they require.

With the following set up you will be able to send and receive SMS messages, one common use is to use your SMS gateway to provide “alerts” from various software applications or relay those generated by email. I’ll also touch on how you can set up a fully functioning 2-way SMS service using PHP (you could just as easily use Perl, Python or shell scripts).

What You’ll Need

  • PC running Linux/Unix
  • Gnokii (http://www.gnokii.org)
  • Mobile phone or GSM Modem and valid SIM card
  • Data Cable (if using a mobile phone)

Warning

A good practice for testing (or even for live systems for that matter!) is to use a “prepaid” SIM card. This helps protect you from running an up an excessive phone bill in case the system malfunctions or it is abused or exploited by a malicious user. I strongly recommend monitoring your server, automated tools can make this job easier.

Installation and Configuration

The first task to complete is building the server and installing Gnokii (note the spelling, it’s not Gnokki). Gnokii is an open source driver for Nokia mobile phones, it does however support many other models of phone. Included in the Gnokii package are some other tools, we’re mainly interested in SENDSMS. It’s also worth mentioning that Gnokii does have a graphical interface called XGnokii, so you’ll need X if you want to run that. Personally for servers, my preference is to run the bare minimum of services. Gnokii (and sendsms) runs quite perfectly from the command line.

 

Installing and configuring the actual server operating system is beyond the scope of this document, however there are plenty of tutorials to help get you started. Keep in mind that if you are directly connecting this machine to the internet, make sure it’s properly secured!

You can install Gnokii in two ways:

  • Package
  • Source

- Installing from a package
You can install Gnokii using your favourite package manager such as apt-get, rpm, yum or ports. Simply query your package repository for gnokii and install it.

- Installing from source
Installing Gnokii from source is quite straightforward, and I personally prefer installing all my software this way as you can always use the latest release.

tar -xzvf gnokii-1-1-1.tar

cd gnokii

./configure

make

 

make install

Once Gnokii is installed, it’s time to connect your device. If you’re using a standard mobile phone, plug your data cable (you can pick these up for around $5 US from your local Radio Shack, or Dick Smith) into your serial port. You may see a message like “Data Connection Successful” or “Data Accessory Connected”.

Next you’ll have to edit the configuration file so Gnokii knows what to look for your device, and what device you are using. You may have to consult the Gnokii documentation if you get stuck.

The Gnokii config file must be copies to the home drive of the user running the process.

# This is a sample ~/.gnokiirc file. Copy it into your home directory and name it .gnokiirc.

Once copied launch your favourite text editor, I'm usingvi.

 

vi .gnokiirc

It’s worth reading all the options in the config file, there are plenty of comments to explain things. The only options you must change are described below.

# Set model to the model number of your phone

model = 6210

 

# Set port to the physical serial port used to connect to your phone.
# Linux version is:
port = /dev/cuaa0

Simply set the above options to the appropriate model and serial port. Now you should be ready to be able to run some test commands to make sure everything is working ok.

A few gnokii commands to get you started are listed below. For a complete listing simply type in gnokii at the command prompt with no options.

gnokii –getnetworkinfo

gnokii –identify

gnokii –getdisplaystatus

gnokii –sendsms destination [--smsc message_center_number |
--smscno message_center_index] [-r] [-C n] [-v n]
[--long n] [-i]

gnokii –netmonitor {reset|off|field|devel|next|nr}

How It Works

Sendsms works by constantly checking an incoming queue. The queue can be in the form of a database, flat file or folder. Using a database is probably the most powerful and flexible method, both MySQL and Postgres are supported. With the database method, all incoming messages are stored in a table called INBOX. Each message has a status that is either 0 (not sent) or 1 (sent).

The February 2004 (Volume 3 Issue 2) issue of PHP Architect actually describes how to do this from start to finish. I highly recommend picking up a copy, you can order back issues (as PDF’s) online.

If all you want is simple email integration, the folder option is easy to set up and you can use tools such as fetchmail and procmail without the need for any additional programming.

2-Way SMS

A very common use for SMS systems is for alerts and notifications, however enabling processing of incoming SMS data is relatively simple. Since Gnokii can also read incoming SMS messages, the only limit is your imagination. You could use a wide variety of tools such as Python, Perl, PHP or shell scripts. If you follow some of the references at the end of this document, you’ll find some examples – many commercial SMS services use these same technologies to drive some very powerful SMS systems.

Further Reading

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

IP Trace Command In Bash

Tags:

Q. What is the ip trace command in bash? How do I trace IP address in Linux / UNIX bash shell prompt?

A. You can use any one of the following command in bash to trace IP address and other stuff:
a] traceroute - It tracks the route packets take across an IP network on their way to a given host. It utilizes the IP protocol’s time to live (TTL) field and attempts to elicit an ICMP TIME_EXCEEDED response from each gateway along the path to the host.

b] tracepath - It traces path to destination discovering MTU along this path. It uses UDP port port or some random port. It is similar to traceroute, only does not not require uperuser privileges. Option -c causes tracepath to use the return address instead of the reply type (connection refused) to determine when to stop.

traceroute command example

To trace IP router it, enter:
$ traceroute {IP-address}
$ traceroute 202.54.2.5
$ traceroute google.com

Sample output:

 1  sl1-dallas.simplyguide.org (74.86.48.97)  0.539 ms  0.740 ms  0.727 ms
 2  po102.dar01.dal01.dallas-datacenter.com (66.228.118.177)  0.713 ms  0.705 ms  0.900 ms
 3  po1.cer02.dal01.dallas-datacenter.com (66.228.118.204)  1.125 ms  1.115 ms  1.102 ms
 4  xe-7-4.r02.dllstx09.us.bb.gin.ntt.net (157.238.224.69)  168.721 ms  168.716 ms  168.704 ms
 5  4.68.63.221 (4.68.63.221)  1.748 ms te-10-1-0.edge2.Dallas3.level3.net (4.68.63.225)  1.722 ms  1.940 ms
 6  ge-1-3-0-79.bbr2.Dallas1.Level3.net (4.68.19.66)  1.928 ms ge-1-3-0-79.bbr1.Dallas1.Level3.net (4.68.19.65)  1.055 ms ge-6-1-0-99.bbr1.Dallas1.Level3.net (4.68.19.193)  1.053 ms
 7  as-1-0.bbr1.Atlanta1.Level3.net (209.247.9.101)  21.007 ms ae-0-0.bbr2.Atlanta1.Level3.net (64.159.1.46)  21.242 ms as-1-0.bbr1.Atlanta1.Level3.net (209.247.9.101)  21.235 ms
 8  ae-21-52.car1.Atlanta1.Level3.net (4.68.103.34)  21.696 ms ae-11-51.car1.Atlanta1.Level3.net (4.68.103.2)  21.691 ms ae-21-52.car1.Atlanta1.Level3.net (4.68.103.34)  21.907 ms
 9  GOOGLE-INC.car1.Atlanta1.Level3.net (4.78.209.194)  21.897 ms  22.126 ms  22.097 ms
10  209.85.254.243 (209.85.254.243)  22.576 ms  188.966 ms 209.85.254.241 (209.85.254.241)  22.549 ms
11  209.85.253.145 (209.85.253.145)  22.180 ms 209.85.253.133 (209.85.253.133)  30.700 ms 209.85.253.137 (209.85.253.137)  30.647 ms
12  yx-in-f100.google.com (74.125.45.100)  22.369 ms  22.295 ms  22.278 ms

tracert equivalents to traceroute -I

To run Windows equivalent tracert command, enter:
$ traceroute -I google.com

tracepath example

Type the command as follows:
$ tracepath {ip-address}
$ tracepath google.com

Related to IP Trace Command In Bash

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Ubuntu Static IP

Tags:

Q. I’ve Intel Corporation 80003ES2 LAN Gigabit Ethernet Controller. How do I set static IP address settings for my Ubuntu Linux as follows:

DEVICE name : eth0
Type: static
IP ADDR : 10.10.29.66
NETMASK : 255.255.255.192
Router IP: 10.10.29.65
Broadcast: 10.10.29.127

How do I setup static IP address under Ubuntu?

A. Ubuntu Linux stores all network configuration option in /etc/network/interfaces configuration file. You need to open this file using a text editor such as vi or gedit.

Open terminal (command line)

Type the following command:
sudo vi /etc/network/interfaces
OR
sudo gedit /etc/network/interfaces
Make the changes as follows:

auto eth0
iface eth0 inet static
address 10.10.29.66
netmask 255.255.255.192
network 10.10.29.65
broadcast 10.10.29.127
gateway 10.10.29.65

Save and close the file. Restart networking:
$ sudo /etc/init.d/networking restart

Related to Ubuntu Static IP

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Edit DNS Configuration Files

Tags:

Q. How do I edit dns configuration file to add my ISPs nameservers?

A. You need to edit /etc/resolv.conf file to set nameserver. Name server IP address Internet address (in dot notation) of a name server that the resolver should query. Up to 3 name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine.

Edit /etc/resolv.conf using a text editor such as vi or nano or gedit:
# vi /etc/resolv.conf
Appnd namesever as follows:
nameserver 4.2.2.1
nameserver 4.2.2.2
nameserver 4.2.2.3

Save and close the file. The algorithm used is to try a name server, and if the query times out, try the next, until out of name servers, then repeat trying all the name servers until a maximum number of retries are made.

Related to Edit DNS Configuration Files

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Windows Server Enable Audio Over RDP

Tags:

Q. I’ve sans hardware soundcard and Windows server 2008 installed. How do I enable audio over RDP (Remote Desktop Protocol) on my Windows server systems?

A. RDP is a multi-channel protocol that allows a user to connect to a networked computer. Audio Redirection is a feature of RDP, which allows users to run an audio program on the remote desktop and have the sound redirected to their local computer.

Remote Desktop Connection Settings

  • Start Remote Desktop Connection
  • Click to expand Options
  • Select Local Resources tab.
  • Under Remote computer sound, ensure that Bring to this computer is selected.
  • Login to the server which needs audio enabled.
  • Now, you should hear the Windows startup login sound.

Finally, make sure Audio is configured correctly for all Windows applications over RDP:

  1. Go to the sound control panel (Start-> (Settings->) Control Panel-> Sounds and Audio Devices)
  2. Select Audio tab.
  3. Select Microsoft RDP Audio Driver for the default playback device, if not already specified.
  4. Check the “Use only default devices” checkbox at the bottom of the dialog.
  5. Click the Voice tab.
  6. Select Microsoft RDP Audio Driver for the default playback device, if not already specified.
  7. Save settings by clicking on OK button.

Related to Windows Server Enable Audio Over RDP

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Diagnosing a dos Attack Under Linux

Tags:

Q. How do I find out if I Linux box is under DoS attack or not form a shell prompt?

A. You can simply use netstat command to print out a list of all open connection to your Linux box. The list will be sorted out using sort command including total number of connections from a specific IP address.

Task: Looking at open connections (DoS)

Login as the root user

Type the following command
# netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

Related to Diagnosing a dos Attack Under Linux

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Solaris UNIX: Change Default Shell

Tags:

How do I change default ksh shell to bash shell under Solaris / OpenSolaris UNIX operating system using command line options?

You need to use passwd command to change your login shell under Solaris UNIX operating systems. Also, the passwd command changes the password or lists password attributes associated with the user’s login name. Additionally, privileged users can use passwd to install or change passwords and attributes associated with any login name.

Change Default Shell

Use the command as follows for normal user (assuming that you have rights:
$ sudo passwd -e username
$ sudo passwd -e vivek

Otherwise login as the root and enter:
# passwd -e root
# passwd -e vivek

You can also create a sudo entry for user called vivek to change his shell:
vivek ALL=NOPASSWD: /bin/passwd -e
Or all users in users group can changer their own shell:
%users ALL=/bin/passwd -e

Related to Solaris UNIX: Change Default Shell

VN:F [1.9.14_1148]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.14_1148]
Rating: 0 (from 0 votes)

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

© 2009 Tutorials for Ubuntu – Redhat – Centos – MacOS – Suse – SunOS – Debian…. All Rights Reserved.

This blog is powered by Wordpress by VNLUCK.COM.

Powered by Yahoo! Answers