PDA

View Full Version : [ubuntu] I can connect from local, but from outside i can



tondop
March 12th, 2009, 07:41 AM
I have a problem. I can connect to remote computer with external IP from the outside but not from LAN. I can ping this external IP from all computers that are not from LAN.
Can you advise what to do with it? Thanks in advance for advice?

blackened
March 12th, 2009, 08:06 AM
All the terminology is great, but unless you use it properly and in a very specific and detailed way, then it's just downright confusing.

What exactly are you trying to do? What exactly is your network setup? In what situations (if any) do you have the connectivity you want? Do you have all appropriate ports forwarded on your router (if applicable)?

tondop
March 12th, 2009, 09:17 AM
This will help to clarify?

computer#A
external IP: 195.168.63.162
mask: 255.255.255.248
default gw: 195.168.63.161
DNS: 195.168.1.2 and 195.168.1.4


computer#B
IP: 192.168.252.57
mask: 255.255.255.0
default gw: 192.168.252.1
DNS: 195.168.1.2 and 195.168.1.2

My problem is, that I cant connet/ping computer#B from computer#A

dmizer
March 12th, 2009, 09:20 AM
Does computer A have a direct connection to the internet, or is there a router between computer A and the internet?

tondop
March 12th, 2009, 09:29 AM
Does computer A have a direct connection to the internet, or is there a router between computer A and the internet?

The sequence from computerA is as follows:
computerA -> router -> Internet


The sequence from computerB is as follows:
computerB -> switch -> router -> Internet


To help it?

MaxIBoy
March 12th, 2009, 09:31 AM
Do you have any ports open?

(I can't ping you either. Sorry, but I couldn't resist.)

sahabcse
March 12th, 2009, 09:33 AM
Hi

Check the following

nmap 195.168.63.162
nmap 192.168.252.57

tondop
March 12th, 2009, 09:35 AM
Do you have any ports open?

(I can't ping you either. Sorry, but I couldn't resist.)

sorry but I do not know this. How to find? The problem is that my router managed provider.

sahabcse
March 12th, 2009, 09:39 AM
Hi

Install the nmap tool and check whether any ports are in closed state..........

Installing nmap

#apt-get install namp

tondop
March 12th, 2009, 10:05 AM
#nmap 192.168.252.57 -PN

Not shown: 1711 filtered ports
PORT STATE SERVICE
135/tcp open msrpc
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3389/tcp open ms-term-serv


and

#nmap 195.168.63.162
Not shown: 1714 closed ports
PORT STATE SERVICE
22/tcp open ssh

So what now??

sahabcse
March 12th, 2009, 10:14 AM
Hi

Install openssh client and server.

sudo apt-get install openssh-client openssh-server. Then try to connect lan machine using ssh,

#ssh username@ip-address

nelskurian
March 12th, 2009, 10:43 AM
Is their any firewall rules that restrict you from pinging the another.
Check the below in both machines.
# iptables -L
Check whether the 'openssh' port open in remote external host.In most cases the 'ssh' port closed in public servers for security reasons

dmizer
March 12th, 2009, 11:58 AM
Is the router connected to machine A the same as the router connected to machine B?

No ping is no problem. The router for machine A probably just has ICMP (http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol) disabled.