LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   linux network (RedHat 9 and Windows2K server) (https://www.linuxquestions.org/questions/linux-newbie-8/linux-network-redhat-9-and-windows2k-server-257964/)

J-zilla 11-22-2004 10:33 AM

linux network (RedHat 9 and Windows2K server)
 
Hello,

I'm fairly new to linux, i need help with a network problem i can't not find any tutorials on how to do this. THis is what i need to do

I have one machine running Redhat 9 and i need it to act as a router to communicate with a windows 2000 advance server machine and a windows 2000 machine (client). I don't know if i need to do something with the iptables using the route command?

I serisouly don't know how to do this any type of help would be great

nixcraft 11-22-2004 10:56 AM

If you got two network interface on Linux box then it is easy job:

Run two commands first,

Code:

echo 1 >/proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/ip_forward

Note you can setup above two in /etc/sysctl.conf so that they will continue after linux reboot
Code:

vi /etc/sysctl.conf
net.ipv4.ip_forward = 1


Assuming that on linux box eth0 is connected to the internet and eth1 is connected to a private LAN:

Code:


iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE

iptables --append FORWARD --in-interface eth1 -j ACCEPT


if it is ppp stuff (dial up) internet then ONLY use following and not ABOVE,

Code:

iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE

iptables --append FORWARD --in-interface eth0 -j ACCEPT        - Assuming one NIC to local LAN

It can't get easier than this

J-zilla 11-22-2004 05:58 PM

Thank you for your help.
i'll try what you told me to do.

Bottesford 11-25-2004 05:20 AM

Those first two commands yielded 'permission denied'.
I am logged in as root so I'm not sure why...


All times are GMT -5. The time now is 03:07 PM.