LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Networking questions (http://www.linuxquestions.org/questions/debian-26/networking-questions-311989/)

tad604 04-11-2005 08:36 AM

Networking questions
 
I am trying to run a webserver on a newly installed debian machine, in between my machine and the Internet I have a router. The router has/does dhcp, and also can take incoming requests on certain ports and forward them specified IP addresses on the local network. All sounds good and seems to be fairly standard stuff. The router can only forward stuff to ip addresses (and not named machines), so I need to give the debian machine a static ip address.

I've found a way to do that, but once I change the ip address and make it static, the debian machine is no longer connected to the router (or the internet at all).

Anyone have any suggestions?

thanks,

-Tad

titanium_geek 04-11-2005 09:00 AM

Hello and welcome to LQ!

ok, so you have to give the debian box an ip address in the same series as the router. for example, 192.168.0.1 and 192.168.0.2

notice the zero in bold? 192.168 was set aside for private networks by the head honchos of tcp/ip. you can change the third number for multiple networks, but for simplicity's sake just pretend that home networks are 192.168.0.something.

the router should have two cards... one to connect to the internet and one to connect to you, right?
you need to find out what ip address on the you side is... I would guess 192.168.0.1, therefore you should set the debian box to 193.168.0.2 (not only 2, just something bigger than 1)

hope this helps. there are a lot of good articles on networking, google them! also search LQ (did you see the search button?) because this has been discussed before...

titanium_geek

zeos 04-11-2005 09:01 AM

Do you have the gateway (router) set in /etc/network/interfaces/ ?

(something like this)

iface eth0 inet static
address 192.168.0.111
netmask 255.255.255.0
gateway 192.168.0.1

tad604 04-11-2005 09:11 AM

I've set the address to something like 192.168.0.X
The router has a similiar address (on the local side, I think 192.168.0.1).

I tried something similiar to:
Quote:

iface eth0 inet static
address 192.168.0.111
netmask 255.255.255.0
gateway 192.168.0.1
Maybe I left off the gateway part (though I thought I tried adding that when I couldn't get connectivity). Or maybe I had this in a different config file...

When you say:
Quote:

/etc/network/interfaces/ ?
Is there a specific file in that directory I should set this in? or?


Thanks for the quick responses,

-Tad

utanja 04-11-2005 08:53 PM

Quote:

Originally posted by tad604
I've set the address to something like 192.168.0.X
The router has a similiar address (on the local side, I think 192.168.0.1).

I tried something similiar to:


Maybe I left off the gateway part (though I thought I tried adding that when I couldn't get connectivity). Or maybe I had this in a different config file...

When you say:


Is there a specific file in that directory I should set this in? or?


Thanks for the quick responses,

-Tad

the basic convention in unix for naming files is as follows:

/directory(etc)/folder (nework)/ file (interfaces)

so /etc/nework/interfaces/ is all you need...

to edit under console mode access would be as follows (using vi or any other command line editor)

vi /etc/nework/interfaces

this will bring in the file interfaces onto the console screen for editing...

:)

tad604 04-12-2005 06:53 AM

Well I got it to work. Initially after changing the interfaces file I lost all network connectivity (again). But I found the "networking menu" under system tools and "activated" the ethernet card.

Just want to say thanks to everyone who answered my question, I'm sure I'll have several more.

-Tad

titanium_geek 04-12-2005 05:15 PM

perhaps I can encourage you to push the"Answered" button?

titanium_geek

tad604 04-12-2005 06:49 PM

Answered Button? Ok... where is this button? I've looked to no avail.

-Tad

titanium_geek 04-12-2005 08:09 PM

hmmm.... it should be at the top of your first post to your right... but it wasn't a popular move, they might have removed it.

titanium_geek

johnMG 04-12-2005 09:08 PM

Do you mean the "thanks" button among the 7 "buttons" at the bottom of each post?

What exactly does that *do* anyway? :)

tad604 04-13-2005 08:40 AM

Thanks button is an easy way to donate money.

-Tad

johnMG 04-13-2005 01:52 PM

Hmm... I think there used to be a button that said "affero", but I never knew what it meant.

titanium_geek 04-21-2005 04:34 PM

nope, it is a button at the top of the first post in a thread. It is there only for the poster. *everyone else sees "post a reply"*

titanium_geek
(if you wanna push the thanks button... go a head! :) )

tad604 04-22-2005 08:27 AM

Actually it says "Post Reply" for me too.


All times are GMT -5. The time now is 12:54 AM.