Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I want to ssh to a machine that is behind a firewall. I have port forwarding enabled on the firewall for port 22, and I can reach on the local network, but not from anywhere. I am sure there is an easy fix any help would be appreciated. I ssh 1**.***.***.184:192.168.0.101
It is an external netgear router. The port forwarding just means that the router wont block or interfer with communication on that port, but not necessarilly only send it to that device. How do you specify which address downstream of the router will get the signal.
I can't speak for NetGear, but for most hardware NAT routers, 'port forwarding' usually means passing on requests on specific ports to specific IPs on the LAN (compare http://en.wikipedia.org/wiki/Port_forwarding and http://en.wikipedia.org/wiki/Network...ss_translation). I have a LinkSys router and the port forwarding is in their web interface under "Applications and Gaming", though it used to be somewhere else. If your router doesn't offer that now, check to see if there is a firmware upgrade that will allow it. This does mean, though, that if you have two computers running services on the same port (BitTorrent is the most frequent example), only one of them will get the inbound traffic. It also means that if you use DHCP, you will have to reset the IP in your NetGear control interface every time the IPs change or you will have to adopt static IPs for the machines being forwarded to (which is what I do).
Port forwarding sends data, directed to a given port, only to a specified PC (by definition). In the Netgear router, you need to specify the IP address of the internal PC that will receive traffic directed to port 22.
You will also need to disable DHCP (if enabled), and statically assign IP addresses on your PCs. Since you can only port forward to a specific IP, DHCP is incompatible with port forwarding (since it dynamically assigns IP addressess).
The configuration specifics for accomplishing these tasks should be in the manual that came with your router.
Thank you. I set it up so it should work, but it isn't. I have port forwarding for port 22 to that computer and I checked its ip before I left. When I get back in town I'll assign it a static ip and see if that helps. Thank you.