Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Network Routing - localhost
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mihochan
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 296
Location: Melbourne again

PostPosted: Tue May 27, 2008 9:41 am    Post subject: Network Routing - localhost Reply with quote

Hi,

I've had some trouble for a while now.

I have a number of services, such as MPD, that I want accessible from the LAN.

They require that I specify a bind address - I would like to specify that address as localhost or 127.0.0.1. But,
when I do the service is inaccessible from outside.

I have worked around the problem by using the IP assigned to the ethernet card, but this is really unsatisfactory. The services don't start for instance if the network is down or changes and I need to know the IP address that will be assigned in advance.

How can I set up my routing table to solve the problem?

Here is the current set up:

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

_________________
In the long run we are all dead - Keynes
Back to top
View user's profile Send private message
di1bert
l33t
l33t


Joined: 16 May 2002
Posts: 963
Location: Oslo, Norway

PostPosted: Tue May 27, 2008 10:17 am    Post subject: Reply with quote

If you want it accessible from your network you're going to have to assign it an IP address.
localhost / 127.0.0.1 is for host only networking and it used by local applications.

Why not statically assign an IP address to your PC so you can get things done ? What is unsatisfactory
about this setup ?

-m
Back to top
View user's profile Send private message
mihochan
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 296
Location: Melbourne again

PostPosted: Tue May 27, 2008 12:02 pm    Post subject: Reply with quote

The main problem is that the machine is not always connected to the network. I don't want things to stop working just because I have to disconnect the ethernet cable.
_________________
In the long run we are all dead - Keynes
Back to top
View user's profile Send private message
vaguy02
Guru
Guru


Joined: 25 Feb 2005
Posts: 424
Location: Hopefully in one place

PostPosted: Wed May 28, 2008 5:27 pm    Post subject: Reply with quote

So you want the services to run for the network and locally on the host, so that if the network cable is disconnected the services are still running on the localhost but not the network?
_________________
Linux Registered User #458185

Intel Quad-Core w/ 4gigs Ram w/ 8800 GTX - Windows 7 RC
2x (Intel Dual-Core w/ 2gigs Ram - Gentoo)
Mac G5 Dual-Core w/ 2gigs Ram - OS 10.5
Back to top
View user's profile Send private message
mihochan
Apprentice
Apprentice


Joined: 16 Apr 2002
Posts: 296
Location: Melbourne again

PostPosted: Thu May 29, 2008 11:42 am    Post subject: Reply with quote

yep.

there is also a related problem that the router-modem I use does not reliably assign the same IP address to any given ethernet card. If the IP address changes, everything dies. I have tried to permanently assign IP addresses but this is either not possible or the router doesn't function as it should.
_________________
In the long run we are all dead - Keynes
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum