LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Accessing home computer from outside

[ILUG] Accessing home computer from outside

Jeroen Massar jeroen at unfix.org
Sat Dec 30 17:36:38 GMT 2006


[3 replies in one]

Colm Buckley wrote:
> On 30/12/06, Timothy Murphy <tim at birdsnest.maths.tcd.ie> wrote:
>> What is the safest way of accessing a Linux home computer from outside?
>> I'm running Fedora-6 with shorewall.
> 
> SSH is generally considered secure if you have good password choices -
> or better, only use pre-shared keys.  It's not a great idea to just
> leave the ssh port open to the outside world (you get a lot of
> dictionary attacks), so a combination of:

Rather do a ratelimit, which will fix the problem very well, as per
various scripts found in google or what I use:
http://unfix.org/~jeroen/archive/rc.ratelimit

>   * Run ssh from a port other than 22

Which is annoying as most hosts do have SSH on port 22 and then you need
to either put a "Port 5022" or similar in your ~/.ssh/config or remember
it. Moving to another box, don't forget to copy it all over.

And the fun part is, it will indeed 'stop', actually avoid, those ssh
scans, but it doesn't avoid a bot simply scanning all the ports on your
box. One could then do a 'if $ip > 500 ports then block' but that will
in the end nicely block you out. (Same for the above script actually)

>   * Restrict the IP ranges from which connections can be made

Reasonable idea, unless you might want to connect from some random
address. I have one 'open' box, the rest are closed, except for the open
box.

>   * Implement port knocking

Which a random portscan can also break and is annoying as you have to do
it everytime to open up that port. If the adversary is on the link in
between they will know the sequence and they are able to connect too.

Extra option:
* Run your SSH on IPv6

As scans don't happen there ;) Also if you blow your IPv4 config (and
you have native IPv6) you can still get in. If you have pf it doesn't
work, but iptables is separate for IPv4 and IPv6, if you peep up your
IPv4 rules you can usually still get in over IPv6, which has saved my
touche a couple of times ;)

paul at clubi.ie wrote:
> IOW: If you want plausible deniability, keep your computers and
> networks slightly /insecure/.

They run Debian unstable, is that good enough ;)

Log files can be faked anyway, thus any capturing done can be false.
Evidence can be planted etc. If some $gov authority wants to get you
they will get you anyway, as they don't lie in court. I am thus far from
worried about that.


Timothy Murphy wrote:
[..]
> Unfortunately I don't know the IP address I'll be calling from.

My general 101 solution: Get a IPv6 tunnel on your laptop, tada you have
a static IPv6 address ;) Then again any other VPN does the same and you
still have the problem that the server accepting the tunnel might be
compromised etc... it's moving the problem around.

> I presently use shorewall to (hopefully) protect my system
> from external access.
> (The ssh port is not open to the world.)
> I see there is some documentation on port-knocking with shorewall,
> at <http://www.shorewall.net/PortKnocking.html>,
> so I guess I'll try to set that up.

I would advise against it, especially as it is more trouble than it is
worth. But that is my view on it. Others think it is great, it might be
that you will think the same thing.

> One thing I guess I've never understood
> is why it is so easy to set up an ssh connection internally,
> eg if someone brings a laptop into the house.
> My shorewall policy allows connection from LAN to firewall:
> 	loc             $FW             ACCEPT
> Does that mean ssh does not look for any authentication in this case?

No, that means that the PACKETS are allowed to that service.
Authentication is handled by the application, not in the network.

Greets,
 Jeroen




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell