Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Routes and Virtual IPs

Routes and Virtual IPs
Thread Tools
Fresh-Faced Recruit
Join Date: Feb 1999
Location: London, UK
Status: Offline
Reply With Quote
Jul 25, 2004, 09:04 AM
 
I'm trying to connect across a VPN to a subnet that can only route packets that appear to originate on a specific subnet. So if the destination network is 192.168.1.0/24 and I set up my home network on 192.168.15.0/24 then I can connect without a problem. But if I set up my own network to be, say, 192.168.50.0/24 then it won't work because the network can't route the packets properly.

So, the setup I have looks something like this:

My machine
192.168.15.155/32
|
v
NAT/Router
|
v
Internet
|
v
VPN Machine
w.x.y.z
|
v
Subnet
192.168.1.0/24

However, as soon as I hit the road, I encouter all sorts of problems since not many networks use 192.168.15.0/24.

I *believe* that I can resolve this by setting up a virtual adapter/IP and then routing packets across it accordingly so that all traffic for 192.168.1.x appears to originate from my virtual IP of 192.168.15.155. This would allow me to connect from any subnet if I can figure out the right commands to add the virtual IP and configure the routing table.

I'm guessing that I need some combination of:

the-knife> ifconfig en0 inet 192.168.15.155 netmask 255.255.255.248 alias
the-knife> route add 192.168.1.0/24 192.168.15.155

But that doesn't seem to do quite what I want (i.e. it hoses the connection). I'm sure that I've got either the route command wrong (becauase the second IP set should really the VPN machine or something) or I need to configure the virtual adapter differently.

Can anyone give me a hand?

thanks.
(Last edited by jreades; Jul 25, 2004 at 10:41 AM. )
     
   
Thread Tools
Forum Links
Forum 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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:23 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2