Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Security question concerning home server

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
Spent
n00b
n00b
User avatar
Posts: 55
Joined: Sun May 30, 2004 12:26 am
Location: Bawlmer Hon!

Security question concerning home server

  • Quote

Post by Spent » Sat Dec 01, 2012 12:18 am

I currently have a headless Gentoo file/print server running these services:

NFS
Samba
Cups
sshd

I would also like to use the server as a router, but I'm not sure if my server would still be secure having the router and server being the same box. Right now the only contact the server has to the outside world is from portage, I'm sharing portage over NFS for my desktop. I currently have a cheap Cisco router, but I would like to consolidate and have less things running up my electric bill. Plus I'm drawn by the "coolness" factor of building a linux router and from the control having one would give me. Building a separate box just for a router seems overkill though and defeats my desire to save electricity.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sat Dec 01, 2012 1:08 am

The security issue depends on whether you plan to offer service to the outside world. If you configure the router to drop all connection attempts and unsolicited UDP from the Internet, then no one can contact those services, so it is as secure as though they were not running. Test your configuration from outside after it is prepared.
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Sat Dec 01, 2012 1:28 am

I've been running a home router/server for ages. If you leave ports open you'll see all kind of attacks. For instance, I run a mail server for local mail, to collect all email alerts my boxes send to me. I had port 110 open to the world. One day I noticed my connection is kind of slow. Closer inspection revealed there were so many attacks on port 110 they actually slowed down my net connection. Of course, Linux/Unix boxes can face outside world without hiding behind hardware firewalls (unlike some tiny-softy stuff), you just have to administer them responsibly.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
faemin
n00b
n00b
User avatar
Posts: 22
Joined: Tue Oct 16, 2012 6:21 am

Re: Security question concerning home server

  • Quote

Post by faemin » Sat Dec 01, 2012 6:51 am

...
Last edited by faemin on Sun Dec 02, 2012 9:41 pm, edited 2 times in total.
Top
elmar283
Guru
Guru
Posts: 316
Joined: Mon Dec 06, 2004 10:57 pm
Location: Haarlem, Netherlands
Contact:
Contact elmar283
Website

  • Quote

Post by elmar283 » Sat Dec 01, 2012 12:26 pm

I have made my gentoobox made a router and that computer is open to the world.
I have an iptables firewal. I followed the guide on http://www.gentoo.org/doc/en/home-router-howto.xml.

There are other guides like:
- http://www.gentoo-wiki.info/HOWTO_Iptab ... _firewalls
- http://www.gentoo.org/doc/en/articles/l ... design.xml
- http://wiki.gentoo.org/wiki/Iptables
- and google.com can be your friend.
Top
Spent
n00b
n00b
User avatar
Posts: 55
Joined: Sun May 30, 2004 12:26 am
Location: Bawlmer Hon!

  • Quote

Post by Spent » Sat Dec 01, 2012 1:27 pm

I was going to use the Gentoo home router guide to set up the router. I did some searching for an answer to my question, the Archwiki router guide specifically says not to run nfs or samba on the router. I thought it would be okay since I have them configured to only be accessible from IP's in my lan. I didn't know if whoever wrote their wiki was being overly paranoid or if I would be committing a "security faux pas" by combining the router and server, so I thought I would ask.
Top
elmar283
Guru
Guru
Posts: 316
Joined: Mon Dec 06, 2004 10:57 pm
Location: Haarlem, Netherlands
Contact:
Contact elmar283
Website

  • Quote

Post by elmar283 » Sat Dec 01, 2012 1:34 pm

I agree with you. As long as you disable the wan card for samba and nfs it should be ok.
I did block them on my iptables rules and in the samba config file. I don not us NFS.
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Sat Dec 01, 2012 1:35 pm

NFSv4 is secure, can be used over internet. I've always had NFS in my router, to host portage for all boxes.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
gabrielg
Tux's lil' helper
Tux's lil' helper
Posts: 142
Joined: Fri Nov 16, 2012 1:34 pm

  • Quote

Post by gabrielg » Sat Dec 01, 2012 1:50 pm

I used to run Gentoo as my router and home server some time ago without problems, I saw attacks and the like, but you'll always get those, nobody could make a successful one anyway. I had several services for the outside world, all HTTP(S), and of course SSH open. I got tired of seeing people trying to access by brute force on SSH so then I hid it behind 443 with a multiplexer (so, 443 would be HTTPS and SSH), no more attempts afterwards.

The only thing I'll say is that the iptables configuration got quite long. I know there are tools out there to manage it better but eventually I installed OpenBSD and kept Gentoo inside the LAN (you end up with two servers, but then again, I haven't got pets so I have to entertain myself with something :-) ).

In summary, it's perfectly safe so long as you manage it responsibly and keep it up to date. Gentoo is very good security-wise. Of course, this doesn't apply to zero days, but those are hard to find anyway. As an anecdote, when the local permission escalation bug came along a few years go (the one that allowed a local user to become root because of some vsplice bug) I successfully tested it in RH Linuxes (32 and 64 bits), Debian (of course) but not Gentoo. So, there you go.
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Sat Dec 01, 2012 1:58 pm

I didn't mention it, but my routers have always been running FreeBSD. Once I rebooted it and for some script error the firewall didn't load. I didn't notice it until someone started using my MPD ... it was without firewall for six months, under attacks, yet nobody managed to get in. Gotta love BSD.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
faemin
n00b
n00b
User avatar
Posts: 22
Joined: Tue Oct 16, 2012 6:21 am

  • Quote

Post by faemin » Sun Dec 02, 2012 5:00 am

...
Last edited by faemin on Sun Dec 02, 2012 9:48 pm, edited 1 time in total.
Top
cach0rr0
Bodhisattva
Bodhisattva
User avatar
Posts: 4123
Joined: Thu Nov 13, 2008 11:14 pm
Location: Houston, Republic of Texas

  • Quote

Post by cach0rr0 » Sun Dec 02, 2012 10:44 am

-there is no *functional* reason not to have these services running on this server/router. If the outside world cannot connect to them, where there are located is completely and totally 100% irrefutably irrelevant. If they cannot be connected to from the outside world, they are not an external attack vector - period. The only reasons not to run these services on an edge router are those of principle and dogma, not function. Can't connect? Can't exploit.

-there is absolutely zero you can do with a dedicated commercial firewall that you cannot do with netfilter, short of vendor-specific proprietary routing protocols. For a home environment, doing so is overkill. For most environments, doing so is overkill.
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Top
Post Reply

12 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy