You are not logged in.

#1 2014-07-21 15:24:18

Darkhunter
Member
Registered: 2013-10-01
Posts: 46

My server is unreachable until I use internet from it

Hello, I have LAMP server on Archlinux.
I installed many power management tools, because I want to have my server power efficient and its almost all the time in idle.
I cant connect to my webpage or SSH until I use internet from the server. When I do for example ping www.google.com, then I can connect to my server.
Can somebody help me to fix it?
And I have another issue.
I dont know, how to add user in vsftpd. I am able only to log in anonymously, which is useless and dangerous.

Last edited by Darkhunter (2014-07-21 15:42:56)

Offline

#2 2014-07-21 20:39:26

Gregosky
Member
From: UK
Registered: 2013-07-26
Posts: 174

Re: My server is unreachable until I use internet from it

Hi, I would not use anything else than openssh to allow file transfer from my server. You can easily mount sftp shares from your server on your home dev machine.

Regarding original question - I noticed the same issue couple of times when firing up machine for the first time after transferring it to VPS. I had to start dhcpcd over after boot and then ping something known - but only after first boot and I do not know why, each update that was forcing me to reboot was showing up on internet straight after boot process was done. Maybe your ISP does something special way when assigning IP?

Last edited by Gregosky (2014-07-21 20:40:10)

Offline

#3 2014-07-21 20:56:55

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: My server is unreachable until I use internet from it

Is your server behind a router?  It sounds like a router problem where it does not know which port to which your machine is attached until you talk to it.,  This is doubly true if you have your server configured to use static addresses, meaning your machine does not even have to contact the DHCP in the router for an address.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2014-07-22 00:38:28

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: My server is unreachable until I use internet from it

Saying you installed power management tools...I'd suspect that perhaps autosuspend or aggressive power management is in place on your network adapter. Try disabling the power management utilities (you can sometimes check the status with powertop) and see if that helps.

Scott

Offline

#5 2014-07-22 22:28:10

Darkhunter
Member
Registered: 2013-10-01
Posts: 46

Re: My server is unreachable until I use internet from it

Gregorsky: I figured out, that it sometimes works without problem and then after reboot it doesnt work at start.
ewaller: I am trying to connect to my server from LAN. I have configured static address on my server. I am not able to configure it through router.
firecat53:I uninstalled everything, but I still have the problem.

Offline

#6 2014-07-23 04:31:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: My server is unreachable until I use internet from it

So, look at the situation from the point of view of the router.   

One of its ports has no carrier, so it knows there is nothing attached there.

Without warning, a carrier comes up on that port, but, unbeknownst to the router, the device attached set its own address (that would be your server).  The router has no way to know the server's address.

Later, a packet comes for the server, and the router does a NAT to a local address, but it does not see anything attached that has that address, so it drops the packet.

Then, the server comes along and tries to access the internet.  Your server sends a packet that has its address.  The router takes note of that and adds that IP to its routing tables so that it knows to find your server on the port from which the packet arrived. 

Finally, another packet arrives from the Internet, this time, the router knows how to find your server.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2014-07-23 07:27:10

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: My server is unreachable until I use internet from it

ewaller wrote:

So, look at the situation from the point of view of the router.   

[....]

Finally, another packet arrives from the Internet, this time, the router knows how to find your server.

^ this; is why usually a server is better of with dhcp configured; with the router using some sort of static address-assignment based on the mac-address

Offline

#8 2014-07-24 02:07:01

Darkhunter
Member
Registered: 2013-10-01
Posts: 46

Re: My server is unreachable until I use internet from it

Yea, but I got some crappy modem, which hasnt any setting to set my IP to static, so I had to do it on server. Any advice?

Offline

#9 2014-07-24 02:16:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: My server is unreachable until I use internet from it

You call it a modem.  Is it a router as well?  I assume it has a DHCP server.  I also assume it has NAT with port forwarding to a private address.   Given these two assumptions, it would be silly if the modem (router) did not have a way to ensure that a specific machine be at a given address.  One means to do this is static addressing.  The other choice is to configure the DHCP server in the router to reserve a specific address for a machine with a specific MAC (that of your server).    If you can do that,  configure your server for dynamic addressing, but it will always get the same assigned address from the router; and the router will know where to find it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#10 2014-07-24 16:31:53

Darkhunter
Member
Registered: 2013-10-01
Posts: 46

Re: My server is unreachable until I use internet from it

Modem and router combined. I am not a newbie in router configuration and I know its silly, but it has port forwarding and DHCP server, but it hasnt configuration for static IP.

Offline

Board footer

Powered by FluxBB