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 02-29-2008, 04:13 AM   #1
LQ Newbie
Registered: Feb 2008
Location: India
Posts: 1

Rep: Reputation: 0
Question port forwarding to internal network at another location thru lease line

First I would like to thank everyone here.

I have two office connected with lease line network.
Main office LAN is

My Application Server ip is & port is 443.

Lease line router LAN ip is & WAN ip is
Both the offices are connected with lease line circuit.
Lease line router LAN ip is & WAN ip is

Branch office LAN is

I have a Linux firewall installed at Branch office
Linux Firewall LAN ip is & WAN ip is

To connect this firewall to main branch, route is added.
i.e. route add -net netmask gw

I wants to do the port forwarding from Linux firewall WAN to Main office application server (port 443) installed at main office.

my firewall script is as follows. Firewall can successfully telnet the port of application server. First of all i dont know this is possible or not, if yes then how?

iptables -t nat -A PREROUTING -p tcp -i eth0 -d --dport 443 -j DNAT --to
iptables -A FORWARD -p tcp -i eth0 -d --dport 443 -j ACCEPT

Thanks in advance.

Last edited by milind19; 03-06-2008 at 03:28 AM.
Old 02-29-2008, 09:53 AM   #2
Registered: Jun 2005
Location: Bosie, ID
Distribution: Fedora Core 4, Kurumin,BackTrack, Slackware 10.2, IPCop
Posts: 105

Rep: Reputation: 15
This might work

Okay. when I looked at your IPTABLES config, I thought everything looked fine. I did a quick search, however, and noticed a couple of discrepencies that might be affecting your networking question:

Port Forwarding using Iptables
Since I have been using 2.4 kernel, I use iptables for firewall and NAT. So these are the Iptable rules required for port forwarding to .

/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d
--dport 8888 -j DNAT --to
/sbin/iptables -A FORWARD -p tcp -i eth0 -d --dport 80 -j ACCEPT

This was taken from

These are commands that can be issued directly from the commandline. You might need to specify which eth card the rule applies to. The is the WAN side, by the way.

Hope this helps in some way. If I'm a little off, I'm sure someone will come along and correct me.


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 to RHEL Internal Webserver thiruknv Linux - Networking 1 01-29-2007 05:14 PM
External port forwarding to an internal host antken Linux - Networking 3 12-17-2006 10:43 AM
Port Forwarding not working for Internal requests angelgw Linux - Networking 2 06-29-2003 01:42 AM
IPTABLES port forwarding to internal network ivanros Linux - Networking 2 12-28-2002 11:19 PM
Port forwarding to internal machine zamzara Linux - Networking 8 12-01-2002 01:21 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:44 AM.

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