LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-22-2007, 03:06 PM   #1
ajaimes
Member
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 34

Rep: Reputation: 15
Forward incoming requests to another server


Hello!,

I have a linux server with a static IP address on eth2 connected to the internet. There's another connection, eth1, which is connected to a local network and among those computers there's a windows server. I need to forward all requests I get on eth2 to the windows server, for example, http, ftp, remote desktoping, etc...

Internet -----> Linux Server ------> Win Server B


I think I can do this using NAT and ip forwarding, but I might be wrong.

Do you have any suggestion on how I can accomplish this?

thank you
 
Old 05-22-2007, 04:44 PM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
You don't really need NAT though you might want to implement it for security reasons.

Iptables is what you want to study. It'll do what you want when you have it configured correctly.
 
Old 05-22-2007, 06:44 PM   #3
ajaimes
Member
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Thank you!, I'll start reading on that... :-)
 
Old 05-23-2007, 12:47 PM   #4
ajaimes
Member
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Hello again!

I've been reading on iptables and I got this:

sudo iptables -A FORWARD -i eth2 -o eth1 -d 200.76.191.28

what do you think?

do you think if my windows server has an IP address of 10.0.0.100 I should replace the eth1 to point directly to its address? for example:

sudo iptables -A FORWARD -i eth2 -o 10.0.0.100 -d 200.76.191.28


Also I found another example

$ sudo iptables -A FORWARD -i eth1 -o eth3 -s 10.0.0.0/24 -m state --state NEW -j ACCEPT

$sudo iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

$sudo iptables -A POSTROUTING -t nat -j MASQUERADE


this example uses NEW, ESTABLISHED and RELATED, and my guess is that because of the way I'm proposing they're not necessary... is it true?

thank you

Last edited by ajaimes; 06-04-2007 at 01:43 PM.
 
Old 06-04-2007, 01:43 PM   #5
ajaimes
Member
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
Hello,

What do you think about my last post?

I'm a newbie on this and I'm afraid I screw it up!

do you think it might work?
 
  


Reply



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
apache track incoming, outgoing requests real-time dtra Linux - Networking 1 07-18-2005 07:19 AM
Forward FTP Requests mitt Linux - Networking 7 04-08-2005 10:11 AM
forward all dns requests to one page Moszer Linux - Networking 4 05-25-2004 01:34 PM
Mod_Proxy (Apache) won't forward requests bentman78 Linux - Software 1 04-20-2004 08:49 AM
HELP with incoming requests guild Linux - Networking 2 09-19-2003 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:47 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
Open Source Consulting | Domain Registration