You are not logged in.

#1 2009-11-28 04:24:38

Ricardi
Member
Registered: 2009-11-28
Posts: 4

can not acces from public ip

hello i recently installed archlinux on my laptop, my problem is that, i installed ssh and xampp but they doesnt work when i try to acces from public ip
but they work perfectly from localhost

[ricardi@pyth0n-mx ~]$ ssh -p 22 ricardi@189.158.83.47
ssh: connect to host 189.158.83.47 port 22: Connection timed out

[ricardi@pyth0n-mx ~]$ ssh -p 22 ricardi@localhost
ricardi@localhost's password: 
Last login: Fri Nov 27 22:20:54 2009 from localhost.localdomain
[ricardi@pyth0n-mx ~]$

same with xampp

this are my conf files..

/etc/hosts.deny

#
# /etc/hosts.deny
#

ALL: ALL: DENY

# End of file

/etc/host.allow

#
# /etc/hosts.allow
#

# let everyone connect to you
sshd: ALL
# End of file

/etc/hosts

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>   <hostname.domain.org>   <hostname>
127.0.0.1               localhost.localdomain   localhost pyth0n-mx
# End of file

i opened my port from my router and chek that they are open from online port scan..., apache work perfectly in windows :P by this reason i think is a problem with some config file...

Last edited by Ricardi (2009-11-28 04:27:54)

Offline

#2 2009-11-28 04:49:40

kermana
Member
Registered: 2009-04-13
Posts: 60

Re: can not acces from public ip

Thats a problem I really never figured. I think many home level routers can't handle this. I would love to know the answer too. I had a server at home which I could connect to from outside using public ip but didn't work when I tried the same public ip from local lan. I have heard you would have to use something like hairpin NAT and some people use internal DNS servers to translate the public domains to the internal ip.

Edit: I reread your post, are you sure you can connect to apache under windows using public ip? I might be completely off here smile

edit 2: did you try setting DMZ?

Last edited by kermana (2009-11-28 05:41:28)

Offline

#3 2009-11-28 07:03:55

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: can not acces from public ip

You need to use port forwarding on your router. Also check that you firewall (router and computer) isn't blocking the connection.

Offline

#4 2009-11-28 07:20:47

Ekimino
Member
From: Maldonado, Uruguay
Registered: 2008-02-26
Posts: 69
Website

Re: can not acces from public ip

Aren't you Denying everything in hosts.deny?

Offline

#5 2009-11-28 07:54:44

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: can not acces from public ip

The public ip address is for use externally, and it works fine that way:

$ ssh -p 22 ricardi@189.158.83.47
The authenticity of host '189.158.83.47 (189.158.83.47)' can't be established.
RSA key fingerprint is bb:07:42:c4:02:41:54:98:df:69:9d:d3:ac:49:c9:fa.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '189.158.83.47' (RSA) to the list of known hosts.
ricardi@189.158.83.47's password:

http://189.158.83.47 also works in my browser. smile

Why do you want to use the external address on your LAN?

Offline

#6 2009-11-28 10:42:20

Ricardi
Member
Registered: 2009-11-28
Posts: 4

Re: can not acces from public ip

tomk wrote:

The public ip address is for use externally, and it works fine that way:

$ ssh -p 22 ricardi@189.158.83.47
The authenticity of host '189.158.83.47 (189.158.83.47)' can't be established.
RSA key fingerprint is bb:07:42:c4:02:41:54:98:df:69:9d:d3:ac:49:c9:fa.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '189.158.83.47' (RSA) to the list of known hosts.
ricardi@189.158.83.47's password:

http://189.158.83.47 also works in my browser. smile

Why do you want to use the external address on your LAN?

because i want to test if i can see from internet, im going to test from external pc ty...

Offline

#7 2009-11-28 10:52:18

Ricardi
Member
Registered: 2009-11-28
Posts: 4

Re: can not acces from public ip

yes i test xampp (apacher server) from outside and it works

so another person that can test my ip from outside???

i thought that is like in windows than i can acces from localhost and public ip in same pc...

can some one explain me why....
can not i acces from pblic ip on lan?


by the way sorry for my bad english smile

Last edited by Ricardi (2009-11-28 11:11:57)

Offline

#8 2009-11-28 11:14:36

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: can not acces from public ip

Even if you do find a way to do it, it's not a valid test of your setup. The only valid test is the one I did i.e. connecting from somewhere else on the internet.

You passed.

Offline

#9 2009-11-28 13:21:52

Hiz
Member
Registered: 2008-11-04
Posts: 40

Re: can not acces from public ip

there are many case that can generate problem like yours. you haven't explain all your network system. so. i can talk about most common case you will have such a problem.
i suppose you are using Internet router at home. in this case....

Ricardi wrote:

[ricardi@pyth0n-mx ~]$ ssh -p 22 ricardi@189.158.83.47
ssh: connect to host 189.158.83.47 port 22: Connection timed out

because,Common Internet router is not work for the IP from local ip address. local ip address mean, YOUR PC ip address, this is NOT the ip 189.158.83.47. so Internet router just ignore it and your request time out. but its work for tomk. cos, he accessed you by internet IP( router did work for him).

Ricardi wrote:

[ricardi@pyth0n-mx ~]$ ssh -p 22 ricardi@localhost
ricardi@localhost's password:
Last login: Fri Nov 27 22:20:54 2009 from localhost.localdomain
[ricardi@pyth0n-mx ~]$

in this case network does work without your router by the information form /etc/hosts file.

and the way you check your web server working. there are easy solution using proxy.  most of major web browser has ability to set proxy. so, you can set up the proxy server for internet browsing. most easy available proxy for you is your internet provider service for you. ask them. or even there are anonymous proxy server you can use by own your risk.  (in this case your request go to proxy server and proxy server access to your ip 189.158.83.47)


by the way, your IP address is public here and login name.. also ssh is available...this is not good situation for your security.

Offline

#10 2009-11-28 16:51:32

Ricardi
Member
Registered: 2009-11-28
Posts: 4

Re: can not acces from public ip

Hiz ty fro the explanation and for the security tip but dont worry my ip is dinamic only need reset conection...

well ty for all information but i thik that is not the case that you suppose because when i did it on windows and it works so the router is not the problem... i think is some missing configuration in my network system..

i'll explain how it's my network system...

i conected via wireless to a router and this conect to internet...

Offline

#11 2009-11-30 10:44:49

Ruckus
Member
Registered: 2007-02-17
Posts: 204

Re: can not acces from public ip

I'm having a hard time understanding nearly everyone in this thread, but from what I can gather is that Ricardi can only access apache from localhost while using Linux and not from the public facing IP. If he logs into Windows he is then able to access apache via the public router.

My first guess would be that you have bound Apache to localhost on the Linux install but not on the Windows install. Check the "Listen" directive inside of /etc/httpd/conf/httpd.conf.

However, if tomk was truly accessing your server then I still have no idea why the local computer would not be able to resolve the public facing IP to it's self if Windows was able to do so. I would compare the network settings between the Windows and Linux installs and see if anything is different. (Is one using DHCP and the other install using a static IP?)

Offline

#12 2009-11-30 20:40:19

uwinkelvos
Member
Registered: 2009-06-07
Posts: 129

Re: can not acces from public ip

first of all i would recommend to test your setup inside your lan. Do you have any other pc in your lan? Use ssh, or netcat -v, or even telnet to connect to [your-lan-ip] on port 22. If your Arch-Network setup is ok, you should see anything, but a connection refused. Else there has to be something wrong on your archbox, though the config files look allright. (Even a WLAN smartphone could do the job. http://[your-lan-ip]:22 in your webrowser. if it times out slowly, the port should be open, if its refused instantly, see above.
Next step: The nat of the router will translate your WAN-IP to your local ip if a connection comes to a port you forwarded to your lan-ip. But your router might have some measures enabled that prevent you from using ssh and/or port 22. (SPI firewall, etc) So i would recommend to try an other port. You can simply add a second Port line in your sshd_config for lets say 23232. Then you could connect to port 22 from inside the lan and to port 23232 from outside, if you forward this port.

Last edited by uwinkelvos (2009-11-30 20:42:40)

Offline

Board footer

Powered by FluxBB