Jump to content
FurtleMcGurtle

No SSH when plugged into regular LAN?

Recommended Posts

Hi,

I went through the initial setup by connecting my Turtle to my laptop and updating to the latest version (per ).%C2'> Once I reset the password for the SSH connection, I disconnected the Turtle from my laptop and connected it directly to my LAN switch. I can see the device come up and pull a DHCP address, and I can ping it just fine, but ALL ports are closed - no SSH for me. Once I reconnect to my laptop to get the 172.16.84.x address, I'm back in business.

I must be missing something - maybe I need to configure one of the modules differently or something?

F

Share this post


Link to post
Share on other sites

If I'm not misunderstanding the question, I don't think it's possible. Once you setup autossh it starts a reverse tunnel to a host that you can use to manage the turtle. The reason you can connect to the turtle when its connected to your USB port is because you're technically on "its" network at that point.

Share this post


Link to post
Share on other sites

I know this was listed as answered but I was having a similar problem and fixed it by editing the openwrt firewall rules. For some reason the device wouldn't let me SSH to it's connected WAN interface if it was connected to just a power adapter on the USB (lan) side. If I connect the turtle to my laptop I could ssh to both the lan (172.x) and the WAN (192.x).

To fix that issue, I added the following rule right before the "Allow-DHCP-Renew" rule in /etc/config/firewall.

# We need to accept tcp packets on port 22,
config rule
option name Allow-ssh
option src wan
option proto tcp
option dest_port 22
option target ACCEPT
option family ipv4

Share this post


Link to post
Share on other sites

Same problem with the SSH on LAN. It works perfect while connected to my laptop but once I take it off.. nothing. I haven't tried Jdorrhos suggestions but I assume its worth a shot.

Share this post


Link to post
Share on other sites

Yeah, so changing firewall settings didn't work in my case. I suppose I need to go back to networking class to figure this one out lol. If anyone knows how to solve the problem (not connecting via SSH without it being plugged in my home/local laptop) please steer me in the right direction.

I've spent 2 days at least trying to figure it out but I have to work =) so thanks.

Share this post


Link to post
Share on other sites

iptables -I INPUT 1 -i eth1 -p tcp --dport 22 -j ACCEPT

? Not sure if this was directed at me or not but if so, I do this on the turtle shell correct?

Share this post


Link to post
Share on other sites

? Not sure if this was directed at me or not but if so, I do this on the turtle shell correct?

That's the firewall you have to change, so yes.

Don't think of the turtle as a usb ethernet adapter, it's a router, with only two ports, ethernet wan and usb lan.

Edited by barry99705
  • Upvote 1

Share this post


Link to post
Share on other sites

The better way to access the turtle over WAN is to have it auto-ssh out of the network to you. Since on a pentest deployment, outside SSH will most likely be blocked.

Share this post


Link to post
Share on other sites

That's the firewall you have to change, so yes.

Don't think of the turtle as a usb ethernet adapter, it's a router, with only two ports, ethernet wan and usb lan.

Ahh true.. Ten four. Thank you for that breakdown. I will jump back on this project soon and try these changes. Appreciate the feedback.

Share this post


Link to post
Share on other sites

The better way to access the turtle over WAN is to have it auto-ssh out of the network to you. Since on a pentest deployment, outside SSH will most likely be blocked.

Right on.... I have the Auto-SSH setup in my things to do as well.. Thanks

Share this post


Link to post
Share on other sites

iptables -I INPUT 1 -i eth1 -p tcp --dport 22 -j ACCEPT

.. ok So I put that in the turtle shell... I still can't access is on the network.

I have it on a Kali laptop.... I don't want to setup AutoSSH, isn't there a simpler way to communicate with this via SSH?

I get the 172.x.x.x ip, of course able to SSH locally but I'm lost here again. I've used iptables and this and that in the past.. my brain can't remember it all.

I just want to SSH into the Lan Turtle via another computer on the same network. :) I suck.. i know this. Thanks ahead of time!

Share this post


Link to post
Share on other sites
On 9/23/2015 at 9:46 PM, Shad said:

iptables -I INPUT 1 -i eth1 -p tcp --dport 22 -j ACCEPT

Sorry to drag up such an old thread but how do I make this stick after reboot? On my pi I can just save a file and add a line to /etc/network/interfaces to make it work but OpenWRT is a little bit different. I tried adding a rule to the firewall (maybe the wrong way?) but that didn't help. I also tried calling iptables-save but that didn't work either. This command definitely works but it only works until I reboot. Auto-ssh works as well but when I run "reboot" from the shell I actually have to unplug the turtle before auto-ssh will come back up (anyone know how to fix that as well?). I appreciate any insight anyone could offer on this. 

Share this post


Link to post
Share on other sites

The fix for me was:

Edit the file: /etc/firewall.user

And add the following:

iptables -I INPUT 1 -i eth1 -p tcp --dport 22 -j ACCEPT

The apply the change:

/etc/init.d/firewall restart

 

Share this post


Link to post
Share on other sites

Hi guys,

Have read it all an STILL have not figured this thing out... :(

I have my LAN Turtle... yes

So.. I plug a LAN cable into the but of the LAN Turtle and then i do this:

- plug the LAN Turtle into my Windows (sigh) machine, get the magic 172.16.84.146 IP address and Putty (ssh) to the LAN Turtle... yes! Works!!

- plug the LAN Turtle into my 2016 R2 KALI freshly installed machine, get the magic 172.16.84.146 IP address and command line ssh root@172.16.84.146... NO!!! connection refused! Ahhhh! Why??! It works on a (I know) windows machine but not a Linux machine... I have tried all the ip tables stuff suggested... and all other stuff suggested in here to, but no luck... 

Please can someone smarter than me (that is most of you guys) help me understand what is going on here? I want to be able to ssh locally to the LAN Turtle plugged locally into my Linux machine. I do not want to have to switch to a windows machine when ever I need to configure the LAN Turtle. 

Really appreciate all the help I can get from you guys...

Thanks in advance.

K

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...