Skip to contentSkip to conversation

Connecting Two Network

LARTC Mohammad Shakir 2 participants 2 messages Apr 22, 2003

lore
Share & tools
lore
#0 lore raw

Dear Experts,

I have two networks running Red Hat Linux 7.3 on both sites server, now I want to connect each other.

When I send any request from pc-2 to Server2 on port 2000 like this http://202.192.182.2:2000 then server2 forward this request to its internal network pc-3 which is running windows2000 with IIS.

and same on other hand, when pc4 send any request to Server1 on port 2000 like this
http://202.192.182.1:2000 then server1 forward this request to its internal network pc-1 which is running windows2000 with IIS.

the purpose of this task is, to access internal website which is running on win2k server from internet.

Is it possible or not ? if not then any other suggestion.

I am sending herewith my network Image also.

On both linux server I am running this iptables script to access internet.

iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

please guide me if it is possible then what should I change in my script.

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

#1 lore raw

Sadly, for you, Mohammed,

This is not a LARTC question. I would recommend the netfilter list, to which you have cross posted.

: I have two networks running Red Hat Linux 7.3 on both sites server, now : I want to connect each other.

If you want to connect the two networks, you can connect them with a VPN (CIPE, vtun, IPSec).

: When I send any request from pc-2 to Server2 on port 2000 like this : http://202.192.182.2:2000 then server2 forward this request to its : internal network pc-3 which is running windows2000 with IIS. :
: and same on other hand, when pc4 send any request to Server1 on port : 2000 like this http://202.192.182.1:2000 then server1 forward this : request to its internal network pc-1 which is running windows2000 with : IIS.

If you really wish to publish these services publicly, you'll want to use DNAT:

http://iptables-tutorial.frozentux.net/iptables-tutorial.html#DNATTARGET
http://linux-ip.net/html/nat-dnat.html

<snip>

Good luck,

-Martin

Signature · 5 lines
Martin A. Brown --- SecurePipe, Inc. --- [email protected]

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/