Programming :: Finding IP Address: Nslookup Or Ifconfig
Oct 14, 2010
I am trying to find IP address. In a socket programming tutorial, I found :
Code:
$ nslookup localhost
command. It gives me a address. However, one colleague told me :
Code:
$ ifconfig
It also returns me inet_addr. But both are different. Kindly tell me the correct method to find IP address? I have also checked the /etc/hosts file but it says "localhost"
View 2 Replies
ADVERTISEMENT
May 5, 2010
When i enter ip or address nslookup does not reply any answer. It shows no server found. "servfail". This is my named.conf file:
[Code]....
View 3 Replies
View Related
May 11, 2009
I would like, from a C program, find the hardware MAC address of the default route path. With BASH I can do a 'route' find 'default and then an ifconfig and grep for 'HWaddr'. Are there C calls to do the same??
View 12 Replies
View Related
Apr 27, 2010
Writing a program that finds the IP address of a host name. Sorry forgot to include the line numbers, but where the $$$ is where the syntax error is. The errors are syntax error before "{" token and syntax error before "if". I've looked throught the code for a couple hours and can't figure out what's causing it. The code is attached below.
#define WIN
#include <stdio.h>
#include <stdlib.h>
[code]....
View 8 Replies
View Related
Aug 13, 2011
I have to change my MAC address in order to get an IP lease via DHCP. But almost no installer CDs have ifconfig and dhclient.
ifconfig eth0 down
ifconfig eth0 hw ether 00:22:15:C0:27:23
ifconfig eth0 up
dhclient eth0
Is there any way to change a MAC address within Debian or Ubuntu installer CDs?
View 2 Replies
View Related
May 31, 2011
When doing the ifconfig command I only receive the IPV6 address. How do I specify that I need the IPV4 address???
View 3 Replies
View Related
Sep 24, 2010
I'm trying to grok a problem I'm having with an embedded machine. I'm pretty sure I can track down the larger problem, but I came across a usage of ifconfig that I don't understand, and I'm pretty sure this is the command that is failing.
The command is: ifconfig eth0 192.168.78.20:9134
I understand how ifconfig works. What I don't understand is the :9134. I can't see anything in the docs about what this means. I know in most contexts it's a port number, but what does it do when bringing up a network interface? Does it limit it to only using port 9134?
View 1 Replies
View Related
Oct 20, 2010
HOW TO GET THE IP ADDRESS OF HOST IN LINUX WITH USING OF HOST AND NSLOOKUP COMMAND and after getting the ip address how to assign it in the variable
View 4 Replies
View Related
Sep 14, 2009
Im an academic (university networks and security lecturer) studying/teaching network and operating system security, and inspired by the work of Hovav Shacham set about testing ASLR on linux. Principley I did this by performing a brute force buffer overflow attack on Fedora 10 and Ubuntu 9. I did this by writting a little concurrent server daemon which accidently on purpose didnt do bounds checking.
I then wrote a client to send it a malicious string brute forcing guessed addresses which caused a return-to-libc to the function usleep with a parameter of 16m causing a delay of 16 seconds as laid out in [URL] Once I hit the delay I new I had found the function and could calculate delta_mmap allowing me to create a standard chained ret-to-libc attack. All of that works fine. However .... To complete my understanding I am trying establish where I can find the standard base address for ubuntu 9 (and other distros) for the following, taken from Shacham:-
Quote:
[code]....
/proc/uid/maps gives me some information but not the base address ldd also gives me the randomised starting address for sections in the user address space but neither gives me the base address. Intrestingly ... when a run ldd with aslr on for over (about) 100 times and checked the start point of libc I determined that the last 3 (least significant) hex digits were always 0's and the fist 4 (most significant) where between 0xB7D7 and 0xB7F9. To me this indicated that bits 22-31 were fixed and bits 12-21 were randomized with bits 11-0 fixed. Although even that doesnt define the boundaries observed correctly.
Note: I am replicating the attack to provide signatures to detect it using IDS, and for teaching purposes. I am NOT a hacker and if needed to could reply from my .ac.uk email address as verification.
View 1 Replies
View Related
Apr 23, 2010
This should be simple, but the machines we ssh into don't seem to have the regular commands.Are there any other simple ways I can use to get my IP?
View 7 Replies
View Related
Aug 13, 2010
I would like to create several aliases to eth0, but have the addresses assigned by DHCP instead of being set to static IP's. Is this even possible? All the examples I've seen assign a static IP using the command:
ifconfig eth0:0 192.168.1.11 up
View 5 Replies
View Related
Jul 7, 2011
it was working but after i installed updates and rebooted it could not get a ip address seems like strange timing it still registers under ifconfig it is not even working on the live usb anyway i can test to be sure it is the chip?
View 3 Replies
View Related
Jan 28, 2011
where are the interface configurations (set by ifconfig, not the static ones) stored? I'm asking because I'm trying to understand, more broadly, the order of IP address lookup. If I ping the local machine (localhost, or one of the interfaces) no messages get sent out (at least according to wireshark), so some local lookup must be taking place.
View 1 Replies
View Related
May 12, 2010
I'm setting up a static IP address & I need to know the mac address of my 2 unbuntu machines? [8.04 & 9.10].
View 3 Replies
View Related
Apr 4, 2010
I'm looking for a way to get my IP address using the command prompt in Linux. I know when you type "ifconfig" you can get your local IP address (i.e. 192.168.0.103), but I'm looking for my IP address that I get from my ISP. How can I get this from Linux without having to visit some website?
View 3 Replies
View Related
Feb 5, 2011
My Ipod got stolen a few days ago and I am trying to figure out its mac address so that i can track it. I have sshed into it several times and i found some logs for some of the sessions but I cant find its mac address anywhere. I am wondering is there a way i can figure it out with my ssh logs or some of my other logs?
View 1 Replies
View Related
Dec 10, 2009
when i send any packet to anu destination and want to see he mac address of source and destination i am using the command tcpdump -qec1 but rather then getting the mac address of source and destination each time i am getting mac address of the system which is broadcasting. will anybody tell me how can i get source and destination mac address even if any other packet is also being broadcast to my network.
View 1 Replies
View Related
Jun 29, 2009
How can i find out what mac address had been configured by factory default. I changed my mac address with
Code:
ip link set addrs 00:01:02:03:04:05
and now want to have the original one back. I'm having some trouble with a gigabit LAN PCI Express card. Namely the 89156 from delock. Output of dmesg
Code:
r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 4.137225] r8169 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 4.137268] r8169 0000:02:00.0: setting latency timer to 64
[ 4.137346] r8169 0000:02:00.0: irq 27 for MSI/MSI-X
[code]....
So the card was recognized by the kernel. The driver was loaded and everything fine.... should be! But after assigning an ip addr and setting the nic up with
Code:
ip addr add 192.168.1.1/24 dev eth1
ip link set dev eth1 up
the kernel complained about something like that
Code:
?SISTEM? Can't assign address Also I could not find anything useful on the net finally the readme gave me some. So i changed the MAC address and everything was fine. The nic came up and got an ip through dhclient.i want to know why the old/original mac address didn't work. But even after reboot the new mac address remains. All I know the old one begun with 7b. how to get the original mac of a nic?
View 4 Replies
View Related
Aug 15, 2010
I have installed Kubuntu Lucid x86 10.4 LTS for the first time. Has anyone got a link that explains how KPackageKit gets the IP address of the repositories? I can install packages using sudo apt-get install xxx OK . KpackageKit tells me I have updates from the repositories. I can select them all and apply , but I get an error that it can't find the repository under a 192.168.100.129:8080 address . Which is not a surprise . I am using mirror.optus.net as a repository and can ping it fine on the command line. So is there somewhere else that KPackageKit maps IP addreses ? I have tried another mirror mirror.aarnet.edu.au and got similar results. My local sub-net is not 192.168.100 and have tried setting fixed IP on the local sub-net and different DHCP addresses and still the same error.
View 5 Replies
View Related
Apr 1, 2011
I want to pass ip address,port address and some parameters from command line using python script.The ip address and port address for establishing socket connection and remaining parameters to execute different connection.
View 1 Replies
View Related
Feb 21, 2011
if i attach a shared memory to my process whch part of the address space it will add(like stack, heap, data, code...).
View 3 Replies
View Related
Apr 6, 2011
I need a small shell based program that prints the mac address of physical ethernet adapter from it's firmware. I need this utility for license generation and appliance activation. I have tried several example but none of them is flawless, The easiest method I have found is to parse the output of "ifconfig" command but it has also some drawbacks.
1. Firstly program should differentiate between physical and virtual adapters. Physical means installed on board(wired or wireless) or installed additionally. Virtual adapters are those created by VPN or created by virtualization apps such as VirtualBox/VMWare etc. I am not interested in virtual ones.
2. In case of more them one physical adapters(wired and wireless), it should print the mac address and description(name & vendor) of both/all adapters.
3. If media is disconnected then also it should be able to read the mac address and description(name, vendor) of card.
4. This one is bit complex. I know that 'ethtool' can show you the universal mac address but it's limited to use only 2 types of drivers and won't work in all cases.
View 2 Replies
View Related
Nov 18, 2009
I want to translate the virtual address to physical address in linux C application, how to do that?
View 1 Replies
View Related
Dec 18, 2010
i want to know mac address of a particular ip but the problem is that i am unable to ping that ip but that ip is being used by someone in my local network that i know from my proxy logs. i want to know the mac address of that ip,
View 5 Replies
View Related
Dec 17, 2008
When I try to access at physical address (0xD0000), we known that it is necessary to convert physical address to virtual address using function IOREMAP(0xD0000, 1024) and return me 0xC00D0000.
Now our doubt is when I have a board with I/O in address 0x150, is it necessary to convert this address to other virtual address??? or with inb(0x150) return me state of I/O in this address? How can I known where is this I/O address in my map memory?
View 7 Replies
View Related
Jan 28, 2011
creating a mailing list I need a software that can do that. Other formats like txt or rtf would be great too, as I can easily convert.
View 4 Replies
View Related
Mar 29, 2011
If i have a shell script to run on a Linux unit, which has a command to Reset(or say upgrade) the unit in between the script.Is it possible to find out the memory address of the next waiting command so that i can store the address to any environment variable in flash , then after Reset will continue Run from the stored address.
View 3 Replies
View Related
Mar 10, 2010
Is there an application that will take the data from an Open Office spread sheet and locate and mark each address on a map?I've got a long list that I need to sort and locate by zip codes.
View 9 Replies
View Related
Feb 16, 2010
I am trying to find out the mac address of the eth0 port on linux probe. This port is controlled by kernal and hence I don't have control over it. How do I find out the mac address of this port ? Is there any system call which will take the ip address and will do the lookup on the linux's ip table to get the mac address ?
View 6 Replies
View Related
Sep 27, 2015
I am not able resolve any domain name but I am able to ping 8.8.8.8..Here is my config of /etc/network/interface
allow-hotplug eth0
iface eth0 inet static
address 10.50.243.141
netmask 255.255.255.0
broadcast 10.50.243.255
gateway 10.50.243.100
dns-nameservers 8.8.8.8
Here is the config of resolv.conf
nameserver 4.2.2.2
View 2 Replies
View Related