Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Home Linux Server
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
shagrat
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 219
Location: Norway

PostPosted: Thu Aug 28, 2003 9:11 am    Post subject: Home Linux Server Reply with quote

I have a old Pentium Celeron 633 Box and wanted to set it up as some sort of server. I want to be able to share my new 3MB cable connection among my familys 4 Windows and 2 Linux machines. Printer sharing would also be great and the box would also have to function as a file server for both the Linux and Windows boxes. But I don't know where to start. What should I run? Samba? Please help me here, and if you have some links to actual home server "projects" that would also be great. Thanks in advance.
Back to top
View user's profile Send private message
syko
n00b
n00b


Joined: 15 Jul 2003
Posts: 36
Location: Alberta, Canada

PostPosted: Thu Aug 28, 2003 9:28 am    Post subject: Reply with quote

Unfortunately, I can't offer a whole lot of help, since I'm far from being a guru, but my setup is this:

2 Windows desktops, 1 Linux desktop and a Linux gateway/router.

For the internet sharing I just use NAT/IP Masquerading (I followed this pretty closely, although it is a bit outdated, and you'd have to adjust for a gentoo install (do you want to use gentoo?)) and an iptables firewall script. The iptables website is a good place to start researching a firewall/router type of setup - specifically the Documentation section with things like "What is iptables?"

For file sharing I use a pretty basic Samba file/print sharing network. I don't recall where I learned about Samba at the moment.

If you haven't already, it might be worth it to do a quick search of the forums for things like NAT, IP Masq, iptables, or Samba. I'm not sure exactly what you'll get, but it might be a good jumping off point.

Like I said, sorry I couldn't be much more help, but I am extremely tired, I set up my little router box quite some time ago, and a lot of the documentation I used I found with google, and so I've since lost it. HTH
Back to top
View user's profile Send private message
shagrat
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 219
Location: Norway

PostPosted: Thu Aug 28, 2003 9:36 am    Post subject: Reply with quote

Thanks, reading some of it now.
Back to top
View user's profile Send private message
smiler.se
Tux's lil' helper
Tux's lil' helper


Joined: 18 Aug 2003
Posts: 115
Location: Sweden - Europe - Earth

PostPosted: Thu Aug 28, 2003 9:57 am    Post subject: Reply with quote

Yeap iptables and samba is the way to go :)
_________________
Christian

Sig out of date. Please upgrade to a newer one.
Back to top
View user's profile Send private message
shagrat
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 219
Location: Norway

PostPosted: Thu Aug 28, 2003 10:03 am    Post subject: Reply with quote

Read up a bit about IP Masquerading and it's seems that some applications don't work behind this setup. What are your experience with this? Will my brother for example be able to angage in an online game while my other brother is chatting on irc? And what about p2p sharing and downloading?
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Thu Aug 28, 2003 10:11 am    Post subject: Reply with quote

For TCP, install a SOCKS proxy. For UDP, use forced-routing.
Back to top
View user's profile Send private message
robostac
n00b
n00b


Joined: 26 Aug 2003
Posts: 34

PostPosted: Thu Aug 28, 2003 10:15 am    Post subject: masq Reply with quote

Most things work behind MASQ. Theres no way you'll really be able to share (unless your isp gives you multiple ip's) without doing MASQ. Most online games will work, and all can be made to work with a bit of fiddling. Hosting Servers won't generally work, unless you do it on the gateway. Peer2Peer will work, in passive mode. IRC works fine (No dcc without fiddling).
Back to top
View user's profile Send private message
shagrat
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 219
Location: Norway

PostPosted: Thu Aug 28, 2003 10:58 am    Post subject: Re: masq Reply with quote

robostac wrote:
Most things work behind MASQ. Theres no way you'll really be able to share (unless your isp gives you multiple ip's) without doing MASQ. Most online games will work, and all can be made to work with a bit of fiddling. Hosting Servers won't generally work, unless you do it on the gateway. Peer2Peer will work, in passive mode. IRC works fine (No dcc without fiddling).


I don't have multiple IP's, in fact I have a random IP now. But I can get a static IP for some extra $$. Is it worth it?
Back to top
View user's profile Send private message
ClausH
n00b
n00b


Joined: 03 Aug 2003
Posts: 58
Location: Herning, denmark

PostPosted: Thu Aug 28, 2003 11:29 am    Post subject: Re: masq Reply with quote

shagrat wrote:
I don't have multiple IP's, in fact I have a random IP now. But I can get a static IP for some extra $$. Is it worth it?

Well i dont think a static ip would make much of a difference on your internal network, no if you are going to use ip masq.
As for the gaming, i set up such a server at my parents house, so i could emerge stuff wile my litlle brother were playing counter-strike. The problem, i belive, with most online games, is that they need a very low latency. fx with the 256kbit/s line at my parents, a 5kbyte/s download would give a ping of more than 1000 in cs, i do not know if this is how it is in general, or a problem with the isp. So what i did was i set up som queing disciplines, effectively cutting the bandwith for download in half, giveing it lowest priority, and cs highest. One should notice though, that cs doesnt need the excess bandwith(i havent testet, but i know that 100kbit/s i more that enough), so one should also put ssh and such traffic in the same queue.

see www.lartc.org
Back to top
View user's profile Send private message
masseya
Bodhisattva
Bodhisattva


Joined: 17 Apr 2002
Posts: 2602
Location: Baltimore, MD

PostPosted: Thu Aug 28, 2003 4:42 pm    Post subject: Reply with quote

Moving from Off The Wall.
_________________
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Back to top
View user's profile Send private message
wishkah
Guru
Guru


Joined: 09 May 2003
Posts: 441
Location: de

PostPosted: Thu Aug 28, 2003 7:30 pm    Post subject: Reply with quote

About that static ip-stuff: It's prolly not worth it. You might wanna give www.dyndns.org a shot. You get a free hostname, all you gotta do is update it whenever your ip changes (e.g. somewhere.dyndns.org) from your server. Check out their homepage, there are plenty of (linux) tools for this purpose.

I wrote a little script that does the updating only if the ip really changed (that's critical, update 3-4 times without necessity and you'll get banned). This one uses ez-ipupdate, which is one of the said update-tools. Just put the script into crontab:

Code:

export MYCURIP=`/sbin/ifconfig | grep P-t-P: | cut -f2 -d: | cut -f1 -d' '`
export MYOLDIP=`/bin/cat ~/oldip`

if [ "$MYCURIP" == "" ]
then
   /bin/echo "Something went wrong while getting current ip, its empty."
else
   /bin/echo "Old IP: $MYOLDIP"
   /bin/echo "Cur IP: $MYCURIP"

   if [ "$MYCURIP" != "$MYOLDIP" ]
   then
      /bin/echo "$MYCURIP" > ~/oldip
      /bin/echo "Updating ip-address."
      /usr/bin/ez-ipupdate -i ppp0 -N root --period 300 -s members.dyndns.org -S dyndns -h HOSTNAME.dyndns.org -u USERNAME:PASSWORD
   else
      /bin/echo "Not updating ip-address."
   fi
fi

_________________
if only I could fill my heart with love...
Back to top
View user's profile Send private message
syko
n00b
n00b


Joined: 15 Jul 2003
Posts: 36
Location: Alberta, Canada

PostPosted: Fri Aug 29, 2003 1:33 am    Post subject: Reply with quote

shagrat wrote:
Read up a bit about IP Masquerading and it's seems that some applications don't work behind this setup. What are your experience with this? Will my brother for example be able to angage in an online game while my other brother is chatting on irc? And what about p2p sharing and downloading?


My personal experience with the Masq setup has been pretty positive - I've yet to run into any sort of problems with programs not working. However, I don't do much online gaming. p2p, irc, im all work fine as long as everything is set up the way it should be. I don't know much about what kind of latency you could expect with online games, though.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Fri Aug 29, 2003 2:00 am    Post subject: Reply with quote

if u don't wanna install gentoo, something like clark connect will do what u are looking for and more..
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!


Last edited by taskara on Fri Aug 29, 2003 5:36 am; edited 1 time in total
Back to top
View user's profile Send private message
stonent
Veteran
Veteran


Joined: 07 Aug 2003
Posts: 1139
Location: Texas

PostPosted: Fri Aug 29, 2003 5:01 am    Post subject: Reply with quote

I really like clark connect as a server distro. I run it as a firewall on my home network. All versions are based off of Redhat releases so you could install apt-rpm or use Redhat's up2date utility. Plus it has a nice web based admin tool similar to many Internet Appliances for firewall, mail, port forwarding, proxy, snort, snortsnarf, samba, ftp... etc..
_________________
Inspiron 4100 & Sun UltraAXe
Portage on Solaris|Dell Laptop Hacks
The way you feel about organized religion is the same way I feel about organized socialism.
Back to top
View user's profile Send private message
shagrat
Apprentice
Apprentice


Joined: 10 Mar 2003
Posts: 219
Location: Norway

PostPosted: Fri Aug 29, 2003 9:01 am    Post subject: Reply with quote

taskara wrote:
if u don't wanna install gentoo, something like clark connect will do what u are looking for and more..


Downloading it now, looks very promesing
Back to top
View user's profile Send private message
endu
n00b
n00b


Joined: 03 Jul 2003
Posts: 18
Location: CH

PostPosted: Fri Aug 29, 2003 1:02 pm    Post subject: Reply with quote

for IRC DCC sends, FTP active modes and some other stuff behind NAT, read about connection tracking with iptables. most games are designed to work behind NAT, so this should be no problem.
Back to top
View user's profile Send private message
Sieg
Tux's lil' helper
Tux's lil' helper


Joined: 07 Oct 2002
Posts: 87

PostPosted: Fri Aug 29, 2003 3:57 pm    Post subject: Reply with quote

I have a setup behind a firewall/gateway that works fine. The router/fw is an Astaro box (great if you have one system to dedicate as a router and firewall), and 2 linux servers, 1 windows server and 2 windows workstations behind it. All hosting works great, the only difference is that you have to do explicit port nat on all services that are hosted behind the firewall/router. In your case, it would be the same for services behind, but you would not need to for the services that you would run from within your router/firewall. As far as P2P, IRC (with DCC), etc goes, sometimes you'll have to, once again, do explicit port nat translations in your gateway. This means that this service will be restricted to that particular system in your network. It can be a pain, but works for me. As far as gaming goes, unless you want to host a server, you should never have a problem connecting to outside games from within your network. There is not one game for which I had to do that so far. The only gaming related software that did need that is voice communication, like battlecom, roger wilco or teamspeak.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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