LinuxQuestions.org
Help answer threads with 0 replies.
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 07-24-2003, 02:23 PM   #1
DKY
Member
 
Registered: Jul 2003
Posts: 60

Rep: Reputation: 15
get local ip address


I set up my apache, but now the thing is i need to point my router to my nix box. How do I get the ip address to the box, is it 127.1.1.1? If so, how do I change it to a 192.168.1.something number. My router only gives me the option to forward to one of those numbers. Thankyou

 
Old 07-24-2003, 02:32 PM   #2
psyno
LQ Newbie
 
Registered: Jul 2003
Posts: 23

Rep: Reputation: 15
Does your router also act as a DHCP server? In that case, you would actually just configure the box to "get IP automatically" and it should assign one in the 192.168.1.xxx range.

About checking the IP, I don't know, I'm brand new to Linux and can't even get through my installation yet, but if you do a quick serach of this forum, you'll find the answer, because I think someone just posted this kind of question a day ago. I think the answer was typing "ifconf" into a console, but I can't remember exactly...

Good luck.
 
Old 07-24-2003, 08:56 PM   #3
XC-Mantis
LQ Newbie
 
Registered: Jul 2003
Location: UK
Distribution: RedHat / Slackware
Posts: 6

Rep: Reputation: 0
I don't know about your router IP - I guess your manual will tell you the default IP address...

What psyno said about DHCP is correct - you can assign your NIC IP from the router itself. I know how to do that in RedHat - run:
redhat-network-config
from the console (as root), and set eth0 to DHCP mode. Of course, this is assuming you're connecting to the router using eth0
I *think* you can also set eth0 to DHCP mode using:
netconfig
in a console.

redhat-network-config also allows you to set the IP address manually, or you can edit:
/etc/sysconfig/network-scripts/ifcfg-eth0
then run
service network restart
to apply changes

Good luck
 
Old 07-24-2003, 08:58 PM   #4
XC-Mantis
LQ Newbie
 
Registered: Jul 2003
Location: UK
Distribution: RedHat / Slackware
Posts: 6

Rep: Reputation: 0
FYI psyno - it's 'ifconfig' in a console to view your IP settings
ifconfig <devicename> will display just that device - e.g. ifconfig eth0
 
Old 07-25-2003, 08:56 AM   #5
DKY
Member
 
Registered: Jul 2003
Posts: 60

Original Poster
Rep: Reputation: 15
I open a terminal, and type in ifconfig then I get the following

bash: ifconfig: command not found
 
Old 07-25-2003, 09:39 AM   #6
DKY
Member
 
Registered: Jul 2003
Posts: 60

Original Poster
Rep: Reputation: 15
and in myredhat-network-config the eth 0 is at "automatically obtain ip address with dhcp" yet it comes up with a 127. 0.0.1 address.
 
Old 07-25-2003, 10:17 AM   #7
Axo
Member
 
Registered: May 2003
Distribution: Debian
Posts: 153

Rep: Reputation: 17
Quote:
I open a terminal, and type in ifconfig then I get the following

bash: ifconfig: command not found
You need to be root ,
su
password *********
DKY:/home/DKY# ifconfig
or
DKY:/home/DKY# /sbin/ifconfig
either way works .

AXO
 
Old 07-25-2003, 10:20 AM   #8
DKY
Member
 
Registered: Jul 2003
Posts: 60

Original Poster
Rep: Reputation: 15
I was root...

I opened the terminal, and typed su -m
then i typed ifconfig and got the above error, till I tried /sbin/ifconfig that works
 
Old 07-25-2003, 10:35 AM   #9
angelrod
Member
 
Registered: Oct 2002
Location: Mexico
Distribution: RedHat 9.0 and SuSE 8.1
Posts: 229

Rep: Reputation: 30
try:

export PATH=$PATH:/sbin

and then:

ifconfig (to see your ip configuration)

to assign an IP to your NIC:

ifdown
ifconfig eth0 192.168.1.X netmask 255.255.255.0 up

if you want it to be assigned by dhcp:

netconfig -d eth0
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
qmail: how to hide Local IP address inaki Linux - Security 3 08-03-2005 10:42 AM
Local IP address R4NG3R Linux - Networking 13 12-03-2003 10:53 PM
DNAT local address range? MadCactus Linux - Security 5 11-20-2003 10:47 AM
finding local IP address flynnhandley Linux - Software 2 10-08-2003 05:08 AM
local address confusion hcmk Linux - Newbie 1 08-26-2002 10:40 AM


All times are GMT -5. The time now is 05:16 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration