View previous topic :: View next topic |
Author |
Message |
bfelger n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/9059010953ff86204c0dbe.jpg)
Joined: 19 Feb 2003 Posts: 47 Location: Augusta, GA
|
Posted: Wed Jun 16, 2004 2:19 pm Post subject: Trying to lock down my box |
|
|
I've only lately become aware of the need for tighter security on my gentoo box after both my roommates' XP boxes on our VPN got hacked.
The first thing I did was close off all external ports on the router except 22, which gets routed to my box (I need external SSH access). I set up sshd to require both pubkey and password authentication, and made it so ping requests get tossed.
So, it looks like my box is airtight for attackers coming in from outside. However, I do not trust the security of the other boxes on the VPN, nor do I trust the router itself (I hear Linksys is easy to hack). If they gain access to any of these, they'll see that I have open ports for X11, samba, cups, and possibly CVS.
How can I close off all external ports on the gentoo box itself except port 22? How do I allow access to an open Samba port, but only for specific IP's on on the VPN? Is there something else I'm missing? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rmalolepszy Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 01 Jan 2004 Posts: 167
|
Posted: Wed Jun 16, 2004 3:01 pm Post subject: |
|
|
You can create samba access lists within samba.
You can also use IPTables, or another form of firewall to restrict access to/from ports and to/from hosts. _________________ Cheers,
Ryan |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
grimm26 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/77136029440c8ec5dde412.png)
Joined: 23 May 2004 Posts: 313 Location: Chicagoland, IL
|
Posted: Wed Jun 16, 2004 3:01 pm Post subject: |
|
|
tcp_wrappers is your friend. man hosts_access and hosts_options to learn how to set up your /etc/hosts.allow and /etc/hosts.deny. That will at least help with locking down sshd better.
For samba, you would NEVER want anything beyond your own LAN to access that IMHO. Make sure in your /etc/smb.conf you have something like:
Code: |
hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0
|
I'm not sure how to protect X very well other than making sure you use magic cookies, but that only helps for securing a session, not for securing the daemon itself.
For cups, the cupsd.conf reads a lot like an apache httpd.conf. The default looks like this:
Code: |
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
</Location>
|
That only allowss access from localhost, so you should be safe.
Unless you are running the CVS service on your box, you don't need to worry. Just having the client binaries installed is not a risk for remote attack. _________________ "Blessed is he who finds happiness in his own foolishness, for he will always be happy". |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
bfelger n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/9059010953ff86204c0dbe.jpg)
Joined: 19 Feb 2003 Posts: 47 Location: Augusta, GA
|
Posted: Wed Jun 16, 2004 3:41 pm Post subject: |
|
|
You're right, I have no intention of sharing outside the LAN. I only want my roommates to access certain folders on my box from Windows XP.
Incidentaly, I do, in fact, want to run a CVS server with external access. What I want though, is for it to be tunneled through SSH, so only people with my SSH key have access to it. I was thinking the same thing for X11.
Thanks for the tips. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|