Comments inline/below.
Ray Strode wrote:
...
2. ) ISP sharing. I have gotten it to the point where my computer can
access the net fine. However, the computers on my internal network are
having no luck at all.
Again, MonMotha is probably more qualified to answer than me, but if you
type this (as root, all one line, with 192.168.0.0/24 replaced with your
network):
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j
MASQUERADE
That will work, assuming eth0 is your internet interface. Note that
this doesn't set up any kind of filtering (though redhat might have some
by default, and this may interfere, check iptables -t filter -L for
info), however that rule doesn't allow people to masquerade back on
which is good. It does however allow them to do nifty tricks like
source routing directly back on, so you might also want to disallow
source routing. Check my script for the sysctl variable (I set it with
/proc) to know what to set (don't remember off the top of my head).
and then type (as root):
/sbin/sysctl -w net.ipv4.ip_forward=1
then all your internal computers should get internet until you reboot.
You can also set that through /proc, which is how a lot of people do it,
but redhat might not like that (it doesn't like a lot of things, but I'm
used to the control-freak nature of Slack :)
If they do, then type (as root):
/sbin/iptables-save > /etc/sysconfig/iptables
and this (as root, all one one line):
cat /etc/sysctl.conf | grep -v net.ipv4.ip_forward >
/etc/sysctl.conf.tmp
and then:
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf.tmp
mv /etc/sysctl.conf.tmp /etc/sysctl.conf
then your computers should get internet permanently.
3. ) Programming c++. I do a simple program in gedit then save. I go to
bash and do the typical g++ - name file
well actually, you should type g++ -o name file (did you just forget the
o in your explanation?).
and then try to do the program by typing it's name. bash says
"command not found"
try ./name instead of just name. Basically, by default Linux doesn't
include the current directory in the PATH. . means current directory,
so by prepending ./ to the name you are telling bash where to find the
program. Another thing you could do is add the current directory to the
path.
export PATH=$PATH:.
That's temporary, but if you add that to a file called ~/.bash_profile
in your home directory it should become permanent.
Be careful doign this. The reason this isn't done by default is to make
it more difficult for trojaned copies of common utilities such as "ls"
to be left around in various places on the system where people might
accidentally run them. No doubt Google has plenty of information
regarding this.
I still have a few ideas that I am going to try. Thank you all in
advnce for all of youir help.
np.
--Ray
Comments inline/above.
--MonMotha