LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-01-2006, 12:35 PM   #1
izghitu
Member
 
Registered: Oct 2005
Location: localhost.localdomain
Distribution: CentOS
Posts: 108

Rep: Reputation: 16
iptables port redirect/forwarding


Hello,
I have my Linux computer with eth0 conected to internet through a router, eth1 connected to my second Windows computer
Is there a posibility to make my Windows computer connectable from the internet through one specific port?
I configured the router to redirect all the incoming connections to the port I need to eth0 of the linux computer, now can somebody please tell me what is the iptables command that will redirect all the incoming connections from eth0 to eth1(ip of the windows computer) on a specific port?

Please help.
Thank you.
 
Old 02-01-2006, 10:26 PM   #2
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I can't directly answer your question, but I can make some suggestions for you.

What you are trying to do is make the linux computer into a router. You can install something like guidedog, which turns your linux box into a router. Doing that would allow you to direct all traffic for a given port to the windows machine, but that won't give the windows box internet connectivity. You can't for example convince the windows computer to look for websites on port 100, if that is what you opened. It needs 80 for websites, 25 to send email, 110 to pop down email, etc. If you want to use the linuxbox as a firewall/router for the windows box, then install both the previously mentioned guidedog and its firewall partner, guarddog.

Substantially easier would be to plug the windows box into your router. If you want firewall functionality from the linux box, then do both guidedog and guarddog, as one without the other won't accomplish what I think you are looking for.

Peace,
JimBass
 
  


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
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 08:35 PM
iptables don't do port forwarding gomen Linux - Networking 4 12-26-2005 04:05 PM
Problem with iptables port redirect and rh9 zkn Linux - Networking 0 05-05-2004 05:34 PM
IPTABLES #Port Forwarding goldenmag Linux - Security 4 11-21-2003 08:10 AM
Redirect port with iptables |DeJoTa| Linux - Networking 0 07-11-2003 02:31 AM


All times are GMT -5. The time now is 10:28 AM.

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