LinHES Forums
http://forums.linhes.org/

Will R5F1 ssh work with port forwarding from router?
http://forums.linhes.org/viewtopic.php?f=6&t=15895
Page 1 of 1

Author:  msfox99 [ Mon Jul 16, 2007 6:58 pm ]
Post subject:  Will R5F1 ssh work with port forwarding from router?

Just upgraded to R5F1. I can putty in to my Myth box from other machines on my home network, but when I try to putty in from the outside with my router set up for port forwarding to my Myth's static IP, I can't get in. This worked fine with the previous version I had (R5A16). I have verified that the Myth box has the correct static IP.

Any ideas?

Thanks,

Mike

Author:  ethernut [ Mon Jul 16, 2007 7:53 pm ]
Post subject: 

Did you set your default gateway correctly?

type "route" and hit enter to see what it is set to/ Is it set to your routers IP?

I have R5F1 and it works great..

Author:  msfox99 [ Mon Jul 16, 2007 10:09 pm ]
Post subject: 

Thanks for the reply.

I did a "route" and I got:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.0     *               255.255.255.0   U     0      0        0 eth0


My router is at 192.168.2.1. I tried adding the route and i now get:

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.2.1     *               255.255.255.255 UH    0      0        0 eth0
192.168.2.0     *               255.255.255.0   U     0      0        0 eth0


I won't be able to see if this is any better until tomorrow. The netmask doesn't look right, but I couldn't seem to change it.

Author:  alien [ Tue Jul 17, 2007 1:17 am ]
Post subject: 

It should look something like (fritz.fonwan.box is the internal FQDN of my router, in your case it would be 192.168.2.1):
Code:
allen@violet:~$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.178.0   *               255.255.255.0   U     0      0        0 eth0
default         fritz.fonwlan.b 0.0.0.0         UG    0      0        0 eth0
If you are using DHCP, this should have all been configured from the router using DHCP. You probably need to fix something on the router. If you are using a statically configured IP, then re-run netcardconfig. The default GW you enter should become the default route. You should not need to add a route manually for this setup.

You know it's working when you can ping the outside world (ex. ping www.google.com)

Author:  mjl [ Tue Jul 17, 2007 7:23 am ]
Post subject: 

Hi,

You would also have to do a port forward in the router so any incoming request to port 22 is routed to the <specific machine ip>.

In R5F1 the only user allowed to connect is the user you added at install time. mythtv & root are wisely blocked by default for safety. Simply su - <your setup user> to switch once logged in.

Mike

Author:  msfox99 [ Tue Jul 17, 2007 8:48 am ]
Post subject: 

New info: I also can't get in to Mythweb from the outside. I double checked the port forwarding setup in my router and it is correct. So I can use both ssh and Mythweb from the inside private network, but not from the outside. Both of these worked fine under R5A16, with the same port forwarding.

I will re-run netcardconfig tonight, but I have already run it a couple of times. I also will try to ping an outside address to see if it works in that direction.

Thanks again.

Author:  alien [ Wed Jul 18, 2007 1:12 am ]
Post subject: 

The missing route can be added temporarily with:
Code:
route add default gw 192.168.2.1

Permanently, it should probably go in /etc/network/interface so it will survive reboots.

You might want to look at this file as there may be something else added to it that is causing this problem. Running netcardconfig should have put the necessary default gw in if you are using static IP addresses (are you using static IPs or DHCP)?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/