LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2015, 12:23 AM   #16
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947

No - YOU can connect to the computer's local IP because you're on the same local network. The local IP means nothing to his computer though. He needs to connect to your network's public IP, and you need to set up a port forwarding rule in your router to forward that connection to your computer.

Think of your various computers on your network like people in a hotel. Their local/private IP is their room number in that hotel, and the address of the hotel is their shared public IP. Telling a stranger to go to "room 203" is meaningless unless they're already in your hotel. If they're not in your hotel, you need to give them the address of the hotel, and tell the front desk that when they arrive they should be directed to room 203. It works exactly the same way here. The hotel's address is your public IP (what you see when you go to www.whatismyip.com). The hotel's front desk is the port forwarding rule in your router, and your room number is your computer's private IP (what you see in ifconfig).
 
Old 04-28-2015, 10:28 AM   #17
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
can i just check a few things with you guys please. when i type ifconfig into my terminal it comes up with many different address numbers. I just want to be sure which one is my actual computer. here is the list I get. the numbers are not wrong, i just changed the numbers for security as i dont know what it reveals.
which one is the computer itself? the one I need him to input.

so my friend in the UK would type in ssh user@133.55.44.77 ( i have created a username and password for him via adduser command on my computer.


Link encap:Local Loopback
inet addr:133.5.7.1 Mask:255.5.6.2
inet6 addr: ::1/144 Scope:Host
UP LOOPBACK RUNNING MTU:44436 Metric:1
RX packets:26824 errors:0 dropped:0 overruns:0 frame:0
TX packets:26824 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3268828 (3.2 MB) TX bytes:3268828 (3.2 MB)

wlan0 Link encap:Ethernet HWaddr 11:1f:8b:a5:98:c2
inet addr:10.1.1.33 Bcast:11.1.1.293 Mask:242.242.242.0
inet6 addr: fe70::23f:7bff:fea9:38c5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1800 Metric:1
RX packets:244694 errors:0 dropped:0 overruns:0 frame:0
TX packets:247756 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:209624351 (209.6 MB) TX bytes:84885694 (84.8 MB)
 
Old 04-28-2015, 10:37 AM   #18
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
sorry I didnt see your reply. give me a minute to check this stuff out.
 
Old 04-28-2015, 10:42 AM   #19
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
Quote:
Originally Posted by suicidaleggroll View Post
No - YOU can connect to the computer's local IP because you're on the same local network.
I get it. thank you

The local IP means nothing to his computer though. He needs to connect to your network's public IP,
great, i understand.

and you need to set up a port forwarding rule in your router to forward that connection to your computer.
i will have to research this, i didnt know about this.

Think of your various computers on your network like people in a hotel. Their local/private IP is their room number in that hotel, and the address of the hotel is their shared public IP.
i get it, thank you

Telling a stranger to go to "room 203" is meaningless unless they're already in your hotel. If they're not in your hotel, you need to give them the address of the hotel, and tell the front desk that when they arrive they should be directed to room 203. rilliant, thank you, i get it.

bIt works exactly the same way here. The hotel's address is your public IP (what you see when you go to www.whatismyip.com). The hotel's front desk is the port forwarding rule in your router, and your room number is your computer's private IP (what you see in ifconfig).
so after i have researched the forwarding rule to the router, what would the syntax look like for the user? would it be the same for him to log in or would he have to have something like ssh usewr@(public ip) private ip
or once the rule has been statd to the router does he just log in as per usual ssh user@public ip?

i appreciate your help on this.
 
Old 04-28-2015, 10:58 AM   #20
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
Assuming your public IP is 111.222.333.444 and your private IP is 10.1.1.33 (from your ifconfig output in post #17), your port forwarding rule in the router would push incoming connections on port 22 to 10.1.1.33, and your friend would run "ssh user@111.222.333.444".
 
Old 04-28-2015, 02:54 PM   #21
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
thank you , i will do it now
 
Old 04-29-2015, 02:36 PM   #22
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
so I set up the port forwarding like stated above and it still didnt work. BUT there is talk about apple airport port forwarding not being compatable with linux? apple and windows works fine but apparently linux wont work. you have to use wine to get it to run on windows. i dont know if this is true because im not savvy enough about all this network stuff just yet. Im actually sick of trying to understand it, Im going to take an online course in networking. I hate that depleted feeling when computers dont do what you want.

but this forum hasd been great for me, ive learned massive amounts asking questions so I will leave this open and if anyone has any news or advise on the apple airport port forwarding I would love to hear it. thanks guys
 
Old 04-29-2015, 06:28 PM   #23
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
The people above that mentioned no Linux compatibility were referring to the configuration utility only. Once the router is configured - regardless of how you were able to do it - it would have no issues forwarding packets to a Linux machine since the TCP/IP implementation is OS-independent.

So if you have a Mac, or a Windows machine, or a Windows OS inside a virtual machine in your Linux box, you can just run the OSX/Windows configuration utility to configure the port-forwarding rule on the router to point to your Linux box.

That said, I have -ZERO- experience with Apple routers, so I don't know the first thing about configuring their firewall or port-forwarding settings. To be honest, I'm very surprised they don't have a simple web configuration page like every other router in existence, I thought that was a pretty basic requirement for a router...

Last edited by suicidaleggroll; 04-29-2015 at 06:30 PM.
 
Old 04-29-2015, 07:01 PM   #24
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
The utility in the Mac is pretty simple looking but there are settings on it that I don't understand. I'm also not sure if the firewall is on or off. There's no mention of a firewall within the utility itself.

I just don't know why it doesn't work. I have followed everyone's advice, I have tested everything and it just times out. I would love to give someone a temporary username and password so they can figure out what it is. It's not logical at this point.
 
Old 04-29-2015, 07:05 PM   #25
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
I would add that I'm not desperately needing the terminal to chat with my firnd. It's a learning curve. I'm just trying to understand all things linux and this is the place where I am stuck.. I'm taking tutorials most days and trying to expand my knowledge.. But this is more than I can handle I think. I keep hoping someone will look at my post and say ' oh no, you need to switch on the wobble board settings " or something.
There must be a network expert out there who can put this right. Come on network expert. Give me a hand.
 
Old 04-29-2015, 07:13 PM   #26
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
Suicidaleggroll, can I give you a temporary username and password please?
 
Old 04-29-2015, 07:48 PM   #27
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,258

Rep: Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947Reputation: 1947
If you like. I'm not a network expert, but I can see what happens and possibly where the connection drops out. You should send it through PM so it's not out on the web.
 
Old 04-29-2015, 08:25 PM   #28
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 2,959

Rep: Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268Reputation: 1268
You can use a site like CanYouSeeMe.org to test whether you have a port properly forwarded to something that is listening.
 
Old 04-29-2015, 09:24 PM   #29
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
wow, cool. so i checked it and it says it cant see it. it can obviously see my public ip but is it saying that it cannot see the port forwarding on port 22? it said the reason is because the connection timed out? what the hell is that?
i gotta tell ya guys, when i get done with this fricken port forwarding thing im gonna write a book about it. ive been at this for days on end. something has to give.
let me do more research and ill get back to you.
 
Old 04-29-2015, 09:28 PM   #30
dunnery
Member
 
Registered: May 2010
Location: East Stroudsburg
Distribution: Debian Jessie
Posts: 211

Original Poster
Rep: Reputation: 8
http://ubuntuforums.org/showthread.php?t=2175995

i found this but they are talking in chinese as far as <im concerned. does this make sense to anyone?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is this the write way to write a 2 command loop script? Bobbyyyy Linux - Newbie 1 04-14-2014 03:03 PM
Disabling 'write command' hirenpandya Linux - Security 9 03-03-2009 06:10 PM
Write command in QT navderm Programming 1 01-04-2009 09:41 PM
how do I write a command? er20ic Linux - Newbie 9 11-08-2006 09:17 PM
How to write Invisible Command rktech83 Linux - General 1 03-09-2006 03:03 AM


All times are GMT -5. The time now is 04:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration