Problem setting up alias ip address
Problem setting up alias ip address
- Subject: Problem setting up alias ip address
- From: Dreamcat Four <email@hidden>
- Date: Wed, 2 Jun 2010 22:10:32 +0100
Hi,
Having problems sending data over an ifconfig alias address.
To create the alias address i am using:
$ ifconfig ppp0 alias <extra ip local address> <remote gateway addr>
netmask 255.255.255.0
Where ppp0 is already up, (and set by the VPN server as a dynamic IP
address). But our aim is to assign locally a static IP address. So
that can be bind()'d to. I would otherwise modify the client app to
use SO_BINDTODEVICE. However there is no such feature on Mac OS X.
So, moving on. This ipconfig alias address seems to almost work (or
partially). Because outgoing packets sent to the new alias address
".111" will all appear on the ppp0 interface.
But rather than going from the alias address -> destination address,
the packet appears there to be going from the local ppp0 assign "real
address" (192.168.0.26) -> (192.168.0.111). So they go nowhere.
janitors-Mac-mini:peers id$ nmap 192.168.2.1 # ppp0 remote address
janitors-Mac-mini:peers id$ sudo tcpdump -i ppp0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ppp0, link-type PPP (PPP), capture size 65535 bytes
14:31:55.350430 IP 192.168.0.26.59258 > 192.168.0.111.http: Flags [S],
seq 1400391633, win 65535, options [mss 1404,nop,wscale 3,nop,nop,TS
val 95271349 ecr 0,sackOK,eol], length 0
14:31:55.350576 IP 192.168.0.26.59259 > 192.168.0.111.https: Flags
[S], seq 3103647381, win 65535, options [mss 1404,nop,wscale
3,nop,nop,TS val 95271349 ecr 0,sackOK,eol], length 0
Perhaps some packet-rewriting rule is also needed?
Any help would be great, thanks.
dreamcat4
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden