Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 08-16-2007, 06:55 AM   #1
Registered: Mar 2007
Posts: 30

Rep: Reputation: 15
linux box router & port forwarding

Dear Experts

I have installed Fedora 7.0 and i want my linux box act as router. My scenerio is

DSL router :

Linux box eth1 connected with DSL router and its IP is

Linux box eth0 connected with LAN switch and its IP is

Default gateway on linux box is

The linux box working as gateway and transparent proxy is also working fine

I have mail MS Exchange server with OWA and OMA and its ip address is

Now i want that the traffic for the ports 25, 143 and 80 reached on my linux box must be forwarded to my server which has IP

Please help me in this regards

Saif ur Rab
Old 08-17-2007, 01:35 AM   #2
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
Moved: This thread is more suitable in Linux - Networking and has been moved accordingly to help your thread/question get the exposure it deserves.
Old 08-17-2007, 01:01 PM   #3
Registered: Aug 2006
Location: Allahabad,India
Distribution: Fedora Core 5
Posts: 41

Rep: Reputation: 15
well, if i'm correct u need to forward connections on to ..
so to my knowledge.. on ur linux box with eth0 and eth1,
1) u can use rinetd , a port forwarding daemon to forward traffic on to or
2) u can use ssh's local port forwarding , might be
ssh -fNL root@ sleep 1
refer to the manual of ssh

hope this helps and plzz correct me if i'm wrong..

Last edited by rs_vijay; 08-17-2007 at 01:04 PM.
Old 08-17-2007, 04:36 PM   #4
Registered: Apr 2003
Location: Stuttgart, BW Germany
Distribution: SuSE 10.3-11.0, Knoppix, Ubuntu 8.10, Fedora 10
Posts: 119
Blog Entries: 5

Rep: Reputation: 15
Use iptables to forward and redirect the external port requests to an internal IP address.

iptables -t nat -I PREROUTING -i dsl0 -p tcp --dport 80 -j DNAT --to # forward all input traffic to port 80 to IP
iptables -I FORWARD -p tcp -i dsl0 -o eth0 s -0/0 -d -j ACCEPT # enable forwarding of all requests to IP in general
Adapt eth0 and dsl0 according your actual NW config.

Last edited by framp; 08-17-2007 at 04:38 PM.


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
port forwarding on Belkin 4-port Cable/DSL Gateway Router sycamorex Linux - Networking 5 03-05-2007 03:27 PM
Router box forwarding IP addresses to main server? jmj99385 Linux - Networking 1 05-05-2006 04:25 PM > Forums > Linux Forums > Linux - Networking

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

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