Networking :: Create A Script To Display DNS And IP Address Information?

Jan 5, 2011

I have been playing with Linux consistently for a couple of months now. I've been a Windows sys. admin for most of my career, so Linux is pretty strange for me. I started off with computers way back with the TRS-80 and then eventually moved to DOS systems. So the command line interface (CLI) of Linux was not completely alien to me, yet my lack of knowledge on the syntax and commands is holding me back. I have come a long way.

Recently I needed to play around with some DNS settings and one of the commands I used frequently in Windows, IPCONFIG /ALL, doesn't have a direct relative that displayed the same information. If you run ifconfig, it doesn't return the DNS servers you are currently using. You have to run a separate command to retrieve that information.

What I have done is created a super simple script that displays the network information for my primary LAN adapter, which is ETH0 in my case. After that, it shows the domain and name server information. Then it pauses for 20 seconds before closing the terminal window.

Here are the contents of the script file:

ifconfig -a eth0
cat /etc/resolv.conf
sleep 20

I simply right-clicked the Linux desktop, choose Create Document, Empty File. I named it something like Network Info. Then I opened it and put this information in it, saved it, and closed it. I renamed the file and added a .sh extension to the end which makes it into a script file. Next, right-click the script and go to properties. In the Permissions tab, check the box next to Execute: Allow executing file as a program. Then click close.

To run the script, just double-click the icon and then click Run In Terminal at the prompt. The terminal window opens, displays the information, and exits after 20 seconds. If you need it longer than that or need a different interface (such as wlan0 for your wireless), you can change or even add that in.

This was all done in Ubuntu 10.10. I know it is very simple and very straight forward and welcome thoughts and feedback about simpler ways to do this. For me, the old-school Windows admin, it's a baby step in the right direction. I am really enjoying learning the Linux OS.

View 7 Replies


ADVERTISEMENT

Fedora :: Write A Program Which Would Get Information From A Webpage And Display The Information On Desktop Sort Of Like A Widget?

Sep 3, 2009

I'm trying to write a program which would get information from a webpage and display the information on my desktop sort of like a widget. I kind of remember there being something like this already made, but for the life of me I can't remember what it's calledDoes anyone know?

View 1 Replies View Related

Fedora Networking :: 10 DNS Information Gets Lost After Changing IP Address To Static

Feb 21, 2009

I am using Fedora 10 and when I first installed my machine, I had a DHCP assigned address to my network card. Later on I decided that I wanted to give my machine more of a server role, so I switched to static IP using the system-config-network utility. What happened after that was that I did change the IP address and routing information, but DNS information gets lost at every reboot, so I need to type it back again.

View 5 Replies View Related

Ubuntu Networking :: Create Wifi To Snif Information From Phone?

Jul 5, 2011

I want to monitor my Android phone's network traffic over WiFi. More specifically, I'm interested in which servers are queried (possibly silently) while my phone is connected. How can I accmplish it?

I have installed Wireshark on my box, and have a working usb adapter. How can I make my Ubuntu act like a router, so I will be able to snif packets through Wireshark?

View 9 Replies View Related

Ubuntu Networking :: Check The Network Connection Applet, It Display Active Information Of Eth0?

Jun 7, 2010

I have a question regarding the configuration of Network Connection. My wired connection is fine right now and when I check the network connection applet, it display active information of eth0. However, when I click the Configure button, the Network Connection window appears but there's nothing in the Wired panel. Should there be a eth0 in that panel? I remember I had one before, but after I messed with some configuration of VPN, my network became unstable and I remove the Network Manager to try to solve the problem. Since then, there's nothing in my Network Connection window, though I can still connect to my router with eth0. Now even after I reinstalled the Network Manager, I still don't get anything.

View 7 Replies View Related

Networking :: Change Desktop Image To Display All Of IP Address?

Feb 14, 2010

I have a script that will change my desktop image to display all of my network IP address. I need to call this script whenever a change in the network occurs. Example, if I disconnect from one network and then connect to another network and get a new IP address.

View 1 Replies View Related

Ubuntu Networking :: Create A Website Name For IP Address?

Mar 11, 2010

I have 10 systems working on LAN with fixed IP given to all the 10. I have ubuntu installed. "ifconfig" shows my IP on eth0 interface. Query : I've my blog at /var/www with Apache installed and it works fine when i give the IP address of eth0 (Not 127.0.0.1). And it works from any system when i gve the IP address.* How can i change the IP address to a simple URL. Eg: Instead of I've tried:1) Adding entry to hosts & configuring httpd.conf in apache. Did not work.2) I don't want any bind, as it should be accesible only within the LAN

View 9 Replies View Related

Ubuntu Networking :: Create A Script So That The Mac Address Get Changed At The Boot

Mar 24, 2010

I'm trying to create an script so that the mac address get changed at the boot for every interface in the computer (eth0, wlan0, etc...).

I've tried with

Code:
for IFACE in $(ifconfig -a -s | egrep -v "^(lo|Iface)" | cut -f 1 -d" ")
do
macchanger -r $IFACE
done
and with

[Code]....

It would also be nice if there was a little program which would ask you at the boot if you want to change the mac address.

View 2 Replies View Related

Ubuntu Networking :: Sample 'c' Code For Browser Basic Function / Get Address And Display Contents?

Oct 5, 2010

I am needing help with two things:

Does anyone have sample 'c' code for a browser basic function, get an address and display the contents? Want to learn bout how it's done.

Second, can anyone point me to the source for "webcam", a webcam capture program? I spent a day on the internet trying to find a home page or source listing.

Sorry if these are "dumbassed" questions, but I am new back to Linux. Been out of the Unix world since 1989.

View 2 Replies View Related

Red Hat / Fedora :: Way To Display All User ID Information?

May 4, 2010

Does anybody know of a way to display all user ID information? Akin to the lsuser command from AIX? Need to find out if an ID is disabled/locked out sucessfully.

View 1 Replies View Related

General :: Determine Whether Computer 'gets IP Address Information From Dhcp Server On Network'

Sep 24, 2010

First, (for samba) how do I determine whether my computer "gets IP address information from a dhcp server on the network," and whether "the dhcp server provides info about WINS servers ("NetBIOS name servers") present on the network," and consequently whether a change to my smb.conf file, "so that DHCP-provided WINS settings will automatically be read from /etc/samba/dhcp.conf," and whether the dhcp3-client package must be installed?

View 2 Replies View Related

Fedora :: Which Program Of KDE Or Of Gnome Of F14 Can Display Hardware Information

Nov 4, 2010

which program of KDE or of Gnome of F14 can display hardware information?

View 4 Replies View Related

Ubuntu :: Display Info On CPU Temp & Other Sensor Information?

Dec 17, 2010

Is there a Linux application which can display motherboard and CPU sensor information and which also satisfies one other, absolutely key, requirement: It should be directly usable, after installation, by a reasonably intelligent computer application user. That is, it does NOT require deep internal knowledge of specific hardware or obscure system software customisation. It does not require hours, days or weeks of reading of documentation which is so crafted as to be the antithesis of end-user guides. It must be capable of being invoked easily.

This eliminates all software that the Ubuntu Software Centre lists when performing a search with the term 'sensors', with the exception of xsensors. All other software listed with this search installs without error but is then totally invisible to me - not even listed under 'installed software'. I am aware a key requirement to be a Linux developer is an advanced commitment to play games of 'I bet I can make my software harder to use than yours', but I'm too old for that now. I don't have a need to prove how technically capable I am.

Xsensors installs and tells me where it can be found, but is inadequate as it lists only 2 CPU core temperature readings. It does not give me any indication of motherboard temperature or fan speeds. That's all I want to do - get a simple snapshot of sensor values without having to resort to entering BIOS setup. It's the sort of information that is so easily available using the ASUS-supplied 'asus-probe' software under Windows. Is it possible, given the key requirement previously mentioned?

View 9 Replies View Related

General :: Display User's Last Login Information When Connected Through FTP?

Apr 11, 2011

I want the last login information whenever I log in through FTP.

This is possible for normal console and SSH logins by configuring in /etc/login.defs file. But I am not able to view the last login information when FTP is used.

View 5 Replies View Related

General :: Display Password Policy Information For A User - Ubuntu?

Jun 9, 2010

Ubuntu Documentation > Ubuntu 9.04 > Ubuntu Server Guide > Security > User Management states that there is a default minimum password length for Ubuntu:

Say the password is to be modified by the user using passwd. Is there a command for displaying the current password policies for a user (such as the chage command displays the password expiration information for a specific user)?

This is rather than examining various places that control the policy and interpreting them since the process could contain errors. A command that reports the composed policy would be used to check the policy setting steps.

View 1 Replies View Related

Programming :: Create A ZIP In Perl Without Storing Path Information?

Mar 1, 2010

I have the following code snippet:

Code:

my $file = 'test/mybigfile';
my $zip = Archive::Zip->new();
my $zipped = $zip->addFile($file);

[code]....

it simply takes a file (in this case, "mybigfile") and creates a ZIP file containing that file only. Now, my problem is that when I go to decompress the ZIP file, it creates the relative (or absolute, depending on case) path of the original file. To make an example:

Code:

$ pwd
/tmp/perl
$ ls -R

[code]....

What I need is *not* to store the path information inside of the ZIP file, so that once I decompress the ZIP file I only get the original one without having paths created.

View 2 Replies View Related

Programming :: Create Script That Gives Network Computer Information?

Oct 28, 2009

I am new to scripting and I have planned to create script which gives me network computer inforamtion. therefore, I want to know how to write script that sends me computer information to my email add.

View 4 Replies View Related

Ubuntu Multimedia :: Way To Create Wmv Video Thumbnails With File Information

Oct 17, 2010

I need a way to create wmv video thumbnails with file information (name, size, resolution, duration) using Ubuntu.

View 6 Replies View Related

Debian :: Display IP Address On The Xfce Desktop?

Mar 18, 2011

I've squeeze with xfce desktop installed. Howto Display IP address after startup automatically on the xfce desktop?

View 5 Replies View Related

General :: Php File To Be Display When Type The Ip Address Only?

Apr 7, 2011

i have some php file and i store it inside /var/www/html/and to display it i type Quote:http://ip addrs/file.phpto display the details..and the problem is that i want the php file to be display when i type the ip address only like thisQuote:

View 3 Replies View Related

Software :: Display External IP Address In Conky?

Nov 27, 2010

I am putting together a Conky config file by a sort of 'smash and grab' approach borrowing things from various configs I've seen around the web that do stuff I like. I have reached a stumbling block as I want to display my external IP, I have used

Code:

${addrs eth0}

to display the IP on my LAN and guessed I would just need to substitute 'eth0' with something else to get the external IP?? I have tried the mac address of my primary router to no avail, this just displays '0.0.0.0' My current config looks like:-

Code:

# set to yes if you want Conky to be forked in the background
background yes
#font
use_xft yes

[code]....

View 2 Replies View Related

Ubuntu Networking :: Port Forwarding From Public Address To Private Address?

Feb 24, 2010

Currently my OS is Ubuntu 9.04 Jaunty Jackalope Desktop OS and my web server is Apache2. I have a public address 60.x.y.z and my pc local address is 10.x.y.z. I have a web app in my Apache2 which currently run in localhost(10.x.y.z).

I would like to enable the web app so that it could be browse from outside. I know there maybe some port forwarding process and some commands involved in order to do that. But I have no idea on the steps to do that.

View 5 Replies View Related

Networking :: Error Str2addr:Address 35 Outside Range Of Address Field Length 1?

May 12, 2011

I am working on implementing a protocol on NS2.34 .I really need help to solve this problem . Actually , I don't now whether the problem is generated by the tcl code or the c++ code when I run the simulation, I get this result :

Code:
num_nodes is set 64
INITIALIZE THE LIST xListHead
34
45
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
code....

View 1 Replies View Related

Networking :: Program To Assign Globa LIPv6 Address And Bind() To The Previously Assigned Address?

Apr 24, 2010

Consider the following program:

Code:
#include <stdio.h>
#include <stdint.h>

[code]...

View 2 Replies View Related

Ubuntu Networking :: Static IP Address And The Install Configures For A DHCP Configured Address - Network Not Starting

Dec 16, 2010

Version 10.04 LTS. Installed desktop version and network worked but I needed a static IP address and the install configures for a DHCP configured address. I tried changing to static address using the System->Preferences->Network Connections application but was unable to get the system to come up with the network up.

So I manually modified the /etc/network/interfaces and the /etc/resolv.conf files. I restart the system but when I do an ifconfig, I don't see a configured IP address on eth0 (only the loopback address). If I run /sbin/ifup eth0 everything then works fine and ifconfig shows the correct address bound to eth0.

My files are as follows:

View 2 Replies View Related

Ubuntu Networking :: IP Address Set To Manual But Still Queries DHCP For Address

Mar 12, 2011

I'm running Ubuntu 10.10 and I'm having problems trying to assign it a static IP address. No matter what I put in the Preferences->Networking area (identifying the interface as Manual)... it still will query DHCP for an address if I run the dhclient command. I'm using to using ubuntu server where I just set the IP in the interfaces config file.

View 1 Replies View Related

Networking :: Dynamic IP Address With PTR Record Versus Fixed IP Address Without?

May 7, 2010

I am running my own Postfix mail server. Some time ago I noticed that most email was rejected because of the server's dynamic IP address. So I got a fixed IP address. However then I noticed that some mails got rejected due to failing the reverse DNS check. So my ISP told me to get a range of IP addresses and they could then create a PTR record for one of those addresses. That is now running but it turns out that the IP address used for the PTR record is a ... dynamic IP address. So Spamhaus PBL rejects my emails again.

View 1 Replies View Related

Programming :: Display IP Address And Host Names In Wireless?

Jul 7, 2010

can any one post the "Java Program to Display IP Address and Host Names in Wireless".

View 9 Replies View Related

Networking :: Bind External IP Address To Internal IP Address?

Jun 7, 2009

I have a few external IP's assigned to me by my ISP. I have IPcop as my router/firewall. I am wondering how to bind 1 of my external ip's to my internal ip address. So I do not have to port forward, etc. For Example, 77.77.77.77 to 192.168.1.123 and on the server it see's the external IP address.

View 2 Replies View Related

Fedora Hardware :: Display Complete Hardware Information Of Computer System?

Jun 3, 2010

Can anybody tell me how to display the complete hardware information (hardware profile)
of my computer system? I use Gnome.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved