LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-22-2004, 10:33 AM   #1
J-zilla
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
Thumbs up 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
 
Old 11-22-2004, 10:56 AM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
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

Last edited by nixcraft; 11-22-2004 at 10:57 AM.
 
Old 11-22-2004, 05:58 PM   #3
J-zilla
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you for your help.
i'll try what you told me to do.
 
Old 11-25-2004, 05:20 AM   #4
Bottesford
LQ Newbie
 
Registered: Nov 2004
Location: Nottingham, UK
Distribution: Ubuntu 7.10
Posts: 6

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ms Win2000 Server & Linux NIS Server ON the same network. tulip4heaven Linux - Networking 3 07-26-2005 07:35 PM
Beginners Only! PostGreSQL, PHP, Apache and RedHat 9.0 ! (migrating from windows2k) scorpatron LinuxQuestions.org Member Success Stories 3 11-14-2003 10:16 PM
Why can i not see my RedHat server in Network Neighbourhood on W2k Server??? NemesisStar Linux - Networking 14 10-20-2003 02:05 AM
Can a Linux print server be set up on a Microsoft server network? crenshawmarc Mandriva 3 09-29-2003 07:40 AM
compile c++ in linux to run win windows2k qwijibow Programming 2 09-23-2003 11:53 AM


All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration