Linux server: with some odd requirements - AVS Forum
Forum Jump: 
 
Thread Tools
post #1 of 14 Old 06-20-2010, 07:11 AM - Thread Starter
AVS Special Member
 
sound dropouts's Avatar
 
Join Date: Jan 2006
Location: Charlotte
Posts: 1,401
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
I am building a server and thinking of putting linux on it. However, I am in college housing and do not have access to their modems. I have two computers other than the server: an HTPC, and a standard pc. I want to rip dvds from the standard pc and place them on the server, from where my htpc will play them. Both my htpc and my main pc run windows 7.

Since I do not have access to the modems, and I do not trust their speed when in heavy use from others on campus, I want to connect the computers via ethernet: My main computer connected to my server, and my server connected to my HTPC. The catch is that I have a wireless internet connection on my main computer that I want shared over the ethernet with the server and the HTPC. Is such a setup even possible? How would I go about accomplishing such a task within linux?

Thanks!
sound dropouts is offline  
Sponsored Links
Advertisement
 
post #2 of 14 Old 06-20-2010, 09:41 AM
Senior Member
 
kwisher's Avatar
 
Join Date: Jun 2008
Posts: 305
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Your requirements are not odd, just standard pc networking 101. I do not believe this is the correct forum for your question but it sounds like all you need is an inexpensive wireless router to connect all of your machines. Connecting them to the school's network is a different ball of wax.
kwisher is offline  
post #3 of 14 Old 06-20-2010, 09:44 AM - Thread Starter
AVS Special Member
 
sound dropouts's Avatar
 
Join Date: Jan 2006
Location: Charlotte
Posts: 1,401
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Well, I was just going to connect them all via ethernet without using a modem...my question was whether I could share internet between them.
sound dropouts is offline  
post #4 of 14 Old 06-20-2010, 02:43 PM
 
mythmaster's Avatar
 
Join Date: Mar 2008
Location: 255.255.255.255
Posts: 2,142
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Yes. I'm assuming that the machine that has the internet connection is a Windows box, so you will need to set up ICS (http://windows.microsoft.com/en-us/w...ection-Sharing). This basically sets up a DHCP server in Windows and will hand out IP addresses to everything else on your network including your Linux server which will use DHCP by default.

Then just set up a Samba share on the Linux server, and you'll be able to map it (map network drive) and use it from your Windows boxes.

FreeNAS with ZFS would be a great distro for this although it's BSD and not Linux.
mythmaster is offline  
post #5 of 14 Old 06-20-2010, 04:58 PM - Thread Starter
AVS Special Member
 
sound dropouts's Avatar
 
Join Date: Jan 2006
Location: Charlotte
Posts: 1,401
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ok great! Thanks for the details, I will try to get that to work.
sound dropouts is offline  
post #6 of 14 Old 06-23-2010, 08:44 PM
Advanced Member
 
wierdo's Avatar
 
Join Date: Feb 2007
Posts: 936
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Many universities lock down their ethernet ports such that you can only plug in one computer, even if you try to do NAT. If you don't need your file server to have access to the Internet it's not an issue, but if you do..watch out.
wierdo is offline  
post #7 of 14 Old 07-17-2010, 08:42 AM - Thread Starter
AVS Special Member
 
sound dropouts's Avatar
 
Join Date: Jan 2006
Location: Charlotte
Posts: 1,401
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Ok, so I have run into some problems. I have my ubuntu 10.04 server connected to the internet via ethernet. Then, on a seperate ethernet card, I have it connected to my windows 7 pc. I can share internet no problem. However, no matter what I do with samba, my windows pc refuses to see shared folders on my ubuntu computer. I used to see other computers on the network from my windows pc, but now even that is gone. Windows reports no ipv6 network access.

Other computers on the network can see my ubuntu computer and its shared folders.
sound dropouts is offline  
post #8 of 14 Old 07-17-2010, 09:30 AM
AVS Special Member
 
waterhead's Avatar
 
Join Date: May 2007
Posts: 1,280
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 13 Post(s)
Liked: 12
To connect two computers directly together, you usually need to use a crossover cable.

http://en.wikipedia.org/wiki/Ethernet_crossover_cable
waterhead is offline  
post #9 of 14 Old 07-17-2010, 11:22 AM - Thread Starter
AVS Special Member
 
sound dropouts's Avatar
 
Join Date: Jan 2006
Location: Charlotte
Posts: 1,401
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Thanks! That was my problem, adding a crossover cable worked.
sound dropouts is offline  
post #10 of 14 Old 07-17-2010, 02:17 PM - Thread Starter
AVS Special Member
 
sound dropouts's Avatar
 
Join Date: Jan 2006
Location: Charlotte
Posts: 1,401
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
One last question that I hope will be simple: how do I password protect my folders so I am the only one who can access the folders over the network? Currently anyone connected over ethernet on campus can edit the files....
sound dropouts is offline  
post #11 of 14 Old 07-17-2010, 02:35 PM
Senior Member
 
SeijiSensei's Avatar
 
Join Date: Sep 2007
Location: Metro Boston
Posts: 466
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Do a search for smbpasswd. The "man" page looks like this, but there are probably much less technical explanations out there as well.

Another useful technique is to limit access to just your user name with the "valid users" parameter in /etc/samba/smb.conf. I recommend you become familiar with smb.conf and its options if you intend to use Samba in an environment like a college campus where institutional and security issues are significant ones. You might also want to consider creating a custom "workgroup" with an unusual name and putting all your machines in that workgroup.

One thing you definitely do not want to permit is any form of "guest" access.

Unless you need to access the server across campus, and even if you do, I'd strongly recommend creating a simple firewall to block all incoming access. If the campus-facing network interface is "eth0" (type "ifconfig" at the command line to see how the cards are referenced if you don't already know), you can block all inbound connections by adding a line to /etc/rc.local like this:

iptables -A INPUT -i eth0 -j REJECT

This blocks all inbound traffic on the external interface.

If you want to be able to see the shared Samba folders across the network, use this:

iptables -A INPUT -i eth0 -p tcp --dport 139 -j ACCEPT
iptables -A INPUT -i eth0 -j REJECT

This allows inbound traffic to "port" 139 where Samba listens and blocks everything else. Make sure you've added password protection as I described above, though.

If you're running a server on your university's network, you should read this.
SeijiSensei is offline  
post #12 of 14 Old 07-17-2010, 02:41 PM
Member
 
Ben_in_COSprings's Avatar
 
Join Date: Sep 2007
Posts: 32
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by sound dropouts View Post

One last question that I hope will be simple: how do I password protect my folders so I am the only one who can access the folders over the network? Currently anyone connected over ethernet on campus can edit the files....

If you only want to serve content to your internal network, you can also tell Samba to only work over one of your physical interfaces.
Ben_in_COSprings is offline  
post #13 of 14 Old 07-17-2010, 02:53 PM
Senior Member
 
SeijiSensei's Avatar
 
Join Date: Sep 2007
Location: Metro Boston
Posts: 466
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by Ben_in_COSprings View Post

If you only want to serve content to your internal network, you can also tell Samba to only work over one of your physical interfaces.

That's a good idea, too!

Add these to the top of smb.conf:

bind interfaces only = yes
interfaces = eth1

assuming that eth1 is the interface connected to your local network.

However I'd still prefer you firewall off the entire external interface to keep people from snooping around your server. If you're really paranoid (like me), go to another place on the campus network and run the program "nmap" to see what services might be visible to the random campus hacker.

Adding the line

iptables -A FORWARD -i eth0 -j REJECT

to /etc/rc.local is probably also a good idea. This keeps your server from "forwarding" packets from outside to the machines connected internally. You can place this before or after the other rules as it references a different "chain," the FORWARD chain rather than the INPUT chain. Otherwise it might be possible to see the Windows machines behind the Samba server from the rest of the network.
SeijiSensei is offline  
post #14 of 14 Old 07-17-2010, 03:23 PM
Senior Member
 
kwisher's Avatar
 
Join Date: Jun 2008
Posts: 305
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Quoted: 0 Post(s)
Liked: 10
Quote:
Originally Posted by sound dropouts View Post

One last question that I hope will be simple: how do I password protect my folders so I am the only one who can access the folders over the network? Currently anyone connected over ethernet on campus can edit the files....

I created a Samba server how-to based on Mint-5 Gnome. The principles of it can still be applied to current distro's. You can find the how-to at my website below:

http://www.kwdesign-consulting.com/
kwisher is offline  
Reply HTPC - Linux Chat

Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off