Saturday, January 24, 2009

how to create a home file server/

The idea is to create a home file server using two computers and a regular Lan cable without a router.
1. Connect the monitor, keyboard, mouse and power to the tower.
2. Download Linux mint.
3. Burn the iso file to a cd.
4. Put the cd in the tower,
5. Boot from cD.
6. Click next, put your time zone etc, click next finish the installation.
7. Mount the required drive from the /etc/fstab using ntfs -3g
8. Reboot
9. Share the drive.
10. Fix the IP address of IP4[Exactly the same way as in windows…click on the network icon, click properties of eth0 etc]
11. Set up the tower to forward
Add the following to the /etc/sysctl.conf
net.ipv4.ip_forward = 1
12. Setup IP forwarding and Masquerading (to act as router), you need to use NAT option of iptables as follows (add following rules to your iptables shell script) :# iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE# iptables --append FORWARD --in-interface eth1 -j ACCEPT
[ If there are only two computers, then add only # iptables --append FORWARD --in-interface eth0 -j ACCEPT]
13. Connect the cable from one computer to other[lan to lan]

No comments: