LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-10-2003, 02:09 AM   #1
Greenhorn
LQ Newbie
 
Registered: Oct 2002
Location: Hokkaido
Distribution: Mandrake 9.0
Posts: 19

Rep: Reputation: 0
How do I find my IP address?


I get this from ifconfig, which is just the LAN address. How do I get my IP address?

Link encap:Ethernet HWaddr 00:50:BA:A8:EB:A3
inet addr:192.168.0.2 Bcast:192.168.0.255


I use Man 9.0. I connect to the internet through a LAN card to an ADSL modem.
 
Old 02-10-2003, 03:10 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
192.168.0.2 - this is ur ip address
 
Old 02-10-2003, 04:57 AM   #3
snocked
Member
 
Registered: Dec 2002
Location: St. Louis, MO
Distribution: Slackware 9.1
Posts: 482

Rep: Reputation: 30
I think he wants to know his public ip, which isn't 192.168.0.2. That's just a standard ip config for LANs. Like mine is 192.168.0.2, but I'm connected through a router as well. I don't know how to find out your public ip with any command or utility in linux, however, this site will display your public ip: http://grc.com/x/ne.dll?rh1ck2l2
 
Old 02-10-2003, 05:11 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://whatsmyip.com
 
Old 02-10-2003, 03:19 PM   #5
Wolfie
LQ Newbie
 
Registered: Jul 2001
Location: Vancouver, Canada
Distribution: RH 9.0 MDK 9.2, 10 Knoppix 3.4 SW 9.1 Debian 3.0, Gentoo, Peanut 9.5, PCLOS 2k4r7, Mepis
Posts: 18

Rep: Reputation: 0
Try this one......

http://www.net.nih.gov/cgi-bin/wwwhoami
 
Old 02-10-2003, 07:20 PM   #6
Greenhorn
LQ Newbie
 
Registered: Oct 2002
Location: Hokkaido
Distribution: Mandrake 9.0
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks guys!

Allright, I'm thoroughly confused about firewalls and iptables, now. I read a couple of howto's and understand the chains and commands of iptables, but the bash stuff confuses me. How do firewalls determine your IP if your using DHCP? I'm having a hell of a time trying to get firestarter to work, and I'm wondering if this is the reason why I keep getting 'iptables invalid mask specified' errors.

Does the firewall need my actual public IP address or to just set my LAN address?
 
Old 02-10-2003, 08:47 PM   #7
equack
LQ Newbie
 
Registered: Feb 2003
Location: Woodstock, GA
Distribution: RedHat 8.0
Posts: 17

Rep: Reputation: 0
First off a caveat - I don't really know beans about the specifics of Linux routers and iptables. I use Freesco (www.freesco.org) on a separate box and I'm primarily a Wintel guy. But...

Assuming that you have only one NIC in the box and it's connected to the ADSL modem, then the modem is running NAT (Network Address Translation) which means the Linux box has no idea what the public IP address is, nor does it care. (This also would mean that for anything to reach you Linux box from the Internet, the modem would also need Port Forwarding, in addition to NAT.)

The following is assuming that this is the only box that is using the ADSL modem - If you're running a LAN, things would be a bit different. If you do need to configure a static address on the Linux box for the firewall to work, you should be able to use any address from 192.168.0.3 to 192.168.0.254 with a 24bit Subnet Mask (255.255.255.0) and point to the modem (probably 192.168.0.1) as the Default Gateway. It won't matter that the modem is still running DHCP if there are no other machines connected to it.

Hope this helps a little...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find an IP address from the MAC address of a remote machine ? jitz Linux - General 3 01-03-2006 07:55 AM
How to find IP address of a machine if I know their MAC Address dysenteryduke Linux - Networking 13 09-12-2005 10:21 AM
How to find MAC address of a specified IP address ? longtongfish Programming 1 07-12-2005 03:26 PM
way to find the address suguname Mandriva 3 01-27-2005 12:42 AM
How do I find my IP address?? Rosmo Linux - Networking 7 10-29-2004 03:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration