LinuxQuestions.org
Help answer threads with 0 replies.
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 03-17-2005, 02:49 AM   #1
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Rep: Reputation: 30
NAT over tunnels


Hi to all...

I have the fallowing network:

| internet |---|main server|---|vpn router1|---|vpn router2|---|computer|

|main server| eth0:xxx.xxx.xxx.xxx
eth1:192.168.1.10

|vpn router1| eth0:192.168.4.11
eth1:yyy.yyy.yyy.yyy

|vpn router2| eth0:zzz.zzz.zzz.zzz
eth1:10.10.10.88

|compuer| netcard:10.10.10.14

So here is what i need:
I want to put the |computer| on the internet with NAT(or masquerade). The problem is that the |vpn router2| has an internet connection on his own and a gre tunnel to |vpn router1|, and the |vpn router1| its the same.
I have put a proxy on the |main server| and all the 10.10.10.0/24 network can see it and they surf the net through that proxy. There is only one computer witch needs a NAT.
With ip route i have put an route to guide the request to the "domain.com" through the tunnel interface and send them to |vpn router1| with make an NAT for the 10.10.10.0 network, so the 10.10.10.0 network can ping their domain. Thai can't ping anything else.

Please tel me how can i NAT the 10.10.10.14 host to 192.168.1.10 so the 10.10.10.14 cat use NAT to surf the net.

Its quite complicated I know, but it's the only way to connect the 2 networks.
THX in advance
 
Old 03-17-2005, 09:57 PM   #2
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
The only problem I can see is that your 'Main Server' may not know how to nat traffic coming from 10.10.10.14 as it doesn't have a local interface within that subnet. ie: it may have a route for 10.10.10.0/24, but that doesn't necessarily mean it will act as a router. I'm assuming that it has a route for your 10.10.10.0/24 subnet as you've mentioned that web is accessible via the proxy. Check that your 'main server' has IP forwarding enabled so that it can forward between subnets, and that the NAT filter knows about traffic with source IP 10.10.10.14...

Similarly, 10.10.10.14 will need to know that all outbound traffic needs to go over the VPN, so adjust your routing table on 10.10.10.14 as required.

what OS/Platform is the main server, and what are you using for NAT?
 
Old 03-18-2005, 01:08 AM   #3
sqn
Member
 
Registered: Apr 2002
Distribution: Ubuntu, Arch, freeBSD, Slackware
Posts: 210

Original Poster
Rep: Reputation: 30
the ip_forward is enabled it ok, because ca computers from 192.168.4.0 can be NAT-et. The problem is the 10.10.10.0 network. there is a NAT on the VPN ROUTER1 for the icmps and ip route routes to specific domains.

I have found that if i put an "ip route dev VPN1" for a specific domain i can use the NAT to view that domain.

I need some route to allow only one ip to all domains not all ip to all


OS/Platform for Main is Linux (slackware 2.4.26) and i use iptables.

PS
I've tryied NAt-ing from main server and use the ip of main server as gateway in the 10.10.10.0 netwok, but still no efect

I hav to route the pakets throu the vpn routers, because every vpn router has internet access through his external interface, and it's dificult to route the pachets, because thay are trying to exit throu the internet from the external interfce.

I will try to make a picture... in reality the vpn is more complicated... it is spread throu another vpn.

Last edited by sqn; 03-18-2005 at 01:14 AM.
 
  


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
Mindterm tunnels treotan Linux - Software 0 04-26-2005 03:06 AM
reliable ipv6 tunnels Stack General 3 12-15-2004 12:53 AM
bridging, routing and tunnels -- oh my! MatthewSabin Linux - Networking 1 08-27-2004 04:07 PM
SSH tunnels and VNC, yet again. Edaph Linux - Security 7 05-23-2004 09:55 AM
gre ip tunnels and their security antken Linux - Networking 5 09-22-2003 04:08 PM

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

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