LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-05-2013, 10:08 PM   #1
drask
LQ Newbie
 
Registered: May 2005
Location: Lewisburg, WV
Distribution: Debian Centos
Posts: 9
Blog Entries: 17

Rep: Reputation: 1
Accessing home automation server behind isp subnet


Okay, so here's the deal. I have a Raspberry pi set up and would like to do some home automation with it. I have some switches set up, and it all works from behind my firewall.

The raspberry pi is getting its public ip address (something like 44.59.158.241) and pushing that into a web page on my hosted website. My router is set up for port forwarding the ports I need to my Raspberry pi. But if I go outside my firewall and try to access my server through my public ip address my connections time out.

Turns out that if I view my WAN IP address on the router, it's something like 192.168.0.21. So obviously my router itself is on a subnet, and there's no way for me to set up port forwarding from the public ip address down to my particular node on the subnet, and I doubt my ISP will be willing to help me since they officially forbid servers anyway (I don't think that policy is really aimed at preventing people from adjusting their lights using their smartphones, but I bet there is a policy in place to never forward ports to a customer).

So, given the tools I have available, is there any way to create a connection from my phone (or even a laptop) to my home server?

Last edited by drask; 09-05-2013 at 10:16 PM.
 
Old 09-06-2013, 01:34 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I do not really understand, but here are some tips:
on no-ip.com you can register your router/modem from outside (not from the subnet side). You should have got an ip from your ISP. This is something named ddns service.
If it was suitable for you you can port forward from your router your query into your subnet.
 
Old 09-06-2013, 08:03 AM   #3
drask
LQ Newbie
 
Registered: May 2005
Location: Lewisburg, WV
Distribution: Debian Centos
Posts: 9

Original Poster
Blog Entries: 17

Rep: Reputation: 1
Simpler Explanation

Thanks for taking a whack at it, pan64. The issue in a nutshell is that the ip address assigned to my modem/router by my ISP is 192.168.0.21 and not a "real" ip address. Forwarding a port from my router to my server is no help, since the address 192.168.0.21 can't be accessed from the internet. My router is behind a router.

Possible solutions that I have thought of so far include using IP6 (which I don't know much about - I'm not sure if my ISP is set up for IP6, and I bet some of the locations I would want to connect to my server from would not support IP6), or connecting my server to a VPN server with a "real" IP address, then connecting my client to the same VPN when I want to access my server (which would require renting hosting somewhere and could be expensive). Simple automations could be accomplished by sending tweets or emails, but I am looking for something more real-time. I could use my website host as a front end and constantly poll that server for commands from my home server, but that seems wasteful and could be mistaken for a DDoS attack.

It seems like this is going to become more of a problem for people as IP4 addresses become more precious and the Internet of Things takes off.

So I'm just looking for ideas for relaying messages, preferably over http, from a client connected to some random place on the internet to a server that is stuck behind a router that I have no control over.

Thanks!
 
Old 09-06-2013, 09:11 AM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Recheck your connection.
Try a traceroute or such to id the hops.

If it really is as you say, you can use a reverse ssh tunnel, with your webserver as the "middle-man".
 
1 members found this post helpful.
Old 09-06-2013, 03:06 PM   #5
drask
LQ Newbie
 
Registered: May 2005
Location: Lewisburg, WV
Distribution: Debian Centos
Posts: 9

Original Poster
Blog Entries: 17

Rep: Reputation: 1
I'll try the reverse SSH

Thanks, Descendant_Command, that's closer to my problem. My ISP likes to shut down ssh sessions after a few minutes of inactivity, but I'll try the reverse ssh and see how that goes. Since my interface is all HTTP/AJAX based at this point, I'll have to do some thinking how to re-implement the back end using SSH. If I can get Net::SSH working in Perl on the webserver, it should be pretty straightforward.

Last edited by drask; 09-06-2013 at 03:09 PM.
 
  


Reply



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] Insteon home automation blfstk Linux - Software 1 06-03-2012 08:40 AM
[SOLVED] accessing on a different subnet daisychick Linux - Newbie 1 11-21-2011 02:56 PM
Accessing my home file/print server through the internet pengyou Linux - Networking 1 03-30-2011 01:10 PM
SLOW Accessing Home Web Server on LAN cyngallery Linux - General 9 08-19-2006 09:15 PM
X10 Home automation oulevon General 5 07-14-2004 08:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:51 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
Open Source Consulting | Domain Registration