View previous topic :: View next topic |
Author |
Message |
mihochan Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/cb6f8a1e3cc37cd9c97c1.gif)
Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
Posted: Tue May 27, 2008 9:41 am Post subject: Network Routing - localhost |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
di1bert l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/1322078658465db3da4a87f.gif)
Joined: 16 May 2002 Posts: 963 Location: Oslo, Norway
|
Posted: Tue May 27, 2008 10:17 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mihochan Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/cb6f8a1e3cc37cd9c97c1.gif)
Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
Posted: Tue May 27, 2008 12:02 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
vaguy02 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1630139893473503dc2fcb0.png)
Joined: 25 Feb 2005 Posts: 424 Location: Hopefully in one place
|
Posted: Wed May 28, 2008 5:27 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mihochan Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/cb6f8a1e3cc37cd9c97c1.gif)
Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
Posted: Thu May 29, 2008 11:42 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|