Go here if you want my library of files and past insights!
------------------------------------------------------
What I've learned about Linux recently:
Networking:
Here are a couple definitions of the networking words I use:
default gateway - it directs your computer to the next "hop"... for instance if you are trying to get on the internet from your computer, your default route will be set by your dialing program to the IP address that your ISP gives you.
------------------------------------------------------
If you are trying to setup a home network, try using the IP address's started with 172.*, 192.* (ie. 172.180.0.1, 172.180.0.2, etc..). I made a mistake by just picking any random numbers such as 199.99.99.2 and it wouldn't work for some reason..
A quick update: Subnet Masks - Which one is right for me? Not to go into too much detail, but there are three different classes of IP addresses. What does this mean, you ask... Well, this means, in regards to subnet masks, a regular class A address will have a subnet of 255.0.0.0, a Class B subnet mask will have 255.255.0.0, and a Class C subnet mask will have 255.255.255.0.
If you are just trying to setup a HOME NETWORK - you will probably use Class C subnet mask. If you are unsure of what IP address to use, here is a listing of what I have on my personal HOME-NETWORK (LAN). Feel free to just replicate it.
On my computer that is acting as the Server (or primary internet connection): IP address: 192.168.0.1, Subnet Mask: 255.255.255.0, Default Gateway: (don't worry about this unless your dialup program (such as wvdial) does not AUTOMATICALLY assign it) - If you have to do everything manual (as far as dialing to your ISP), then your default gateway is the dynamic or static IP address that your ISP gives you (after you connect).
New: Commands to configure your ethernet card are:
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
To check to see if it worked, type ifconfig -a
route add -net 192.168.0.1 netmask 255.255.255.0 eth0
To check to see if it worked, type route and see if your route shows up!
One last thing to be done on your SERVER. If you are running Redhat 6.0 or later, type pico /etc/sysconfig/network and change the packet forwarding to YES (it probably is defaulted to NO).. this will make your SERVER act as a router to all your local PCs (which is a must for internet users!!). Make sure the other information in that file is correct as well. Once you have those settings, if you are trying to get a Linux workstation to access the internet, you need to download my IP_MASQ script or a complex firewall script and run that on the Server. If you want this automated at boot time, copy it to /sbin, then pico /etc/rc.d/rc.local and add a line (anywhere) that says: rc.firewall.
I hate to tell you after you have done all of this work, but you will lose all of this stuff after you reboot. The only way to keep it is to add all this stuff to your bootup script. I have simplified this. Download my script (You may need to right click to save..), then simply edit the information, copy it to /sbin, then pico /etc/rc.d/rc.local and add a line (anywhere) that says netup.
On all my other computers that are acting as Workstations: IP Address: 192.168.0.4, 192.168.0.5, 192.168.0.6. Subnet Mask: 255.255.255.0. Default Gateway: 192.168.0.1 (*Very Important* Which is the IP Address of my Server). If you want to simplify this, and more importantly make it load at boot time, you will want to download my netup script (you might need to right click and choose save as to grab this file), and then pico the file and change the addresses for your needs. Once that is done, copy it to /sbin and then pico /etc/rc.d/rc.local (if you are a Redhat user) and add a line (anywhere) that has: netup. That's it!
With that said, the first (and most obvious) thing you need to do is get your network card installed.. Unfortunately, I have learned that this is dependant on the type of network card you buy. Some have help programs that tell you how to do it, but make sure you buy a ethernet card that is compatible with Linux. The one I bought was a D-Link DFE-530TX which comes with a file on a floppy disk called rtl8139.c and you have to first copy this file to /usr/src/linux, then type " gcc -DMODULE -D__KERNEL__ -Wall -Wstrict-prototypes -O6 -O rtl8139.c", then type lsmod to make sure it loaded? all to get it to work (you might get some warning messages, I was told to disregard). But the main thing is, it works in Linux! Update 6-12-2000 - The previous instructions are for people who have had Linux installed and don't want to re-install it. For new users, just pop the D-link ethernet card in a PCI slot, and Linux will AUTOMATICALLY install it because it has the tulip-compatible driver (which is basically a generic driver). So if you are looking for a very cheap yet compatible card, this is a good choice. I also have a D-link PCMCIA card as well in my Laptop.. I love D-link products :) Every D-Link product I have worked with has worked under linux.
You can buy it cheaper then on dlink.com by going here: http://www.accessmicro.com/productinfo.php3?ProductId=HDDLNKDFE-530TX
------------------------------------------------------
Wanna know how to change file permissions when you type ls -l?
Man chmod - that will give you an idea of what each file permission is?
Then type: chmod (+ or -)(r,x,w,etc..) (filename)
New Addition: Using "./" before a filename that has a flag of x (executable) (you can find out if it has the executable flag when you type "ls -l") will execute it. You might say "oh, duh" ...but lots of people don't know how to execute a script!! :)
Modified 8/23/2000 7:04 P.M. Est.