• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem setting up alias ip address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem setting up alias ip address


  • Subject: Re: Problem setting up alias ip address
  • From: Dreamcat Four <email@hidden>
  • Date: Thu, 3 Jun 2010 13:57:50 +0100

Hmm,
Have read today that (according to this link)

http://docs.huihoo.com/darwin/opendarwin/articles/network_config/ar01s03.html

The routing table should be taken care of by ifconfig, however I may
have had an incorrect netmask. So retried with a new ip number on
different netmask...

$ sudo ifconfig ppp0 192.168.22.22 192.168.2.1 netmask 255.255.255.0 alias
$ ifconfig ppp0
ppp0: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1448
	inet 10.64.64.64 --> 192.168.2.1 netmask 0xffffff00
	inet 192.168.22.22 --> 192.168.2.1 netmask 0xffffff00

$ 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


13:50:25.954581 IP 192.168.0.50.63626 > 192.168.2.1.nat-pmp: UDP, length 2
13:50:25.998323 IP 192.168.2.1 > 192.168.0.50: ICMP 192.168.2.1 udp
port nat-pmp unreachable, length 38

This above activity is through the 192.168.22.22 alias address.

janitors-Mac-mini:~ id$ nmap 192.168.22.22 -PN

Starting Nmap 5.21 ( http://nmap.org ) at 2010-06-03 13:55 BST
Strange error from connect (65):No route to host
Nmap scan report for 192.168.22.22
Host is up.
All 1000 scanned ports on 192.168.22.22 are filtered

Nmap done: 1 IP address (1 host up) scanned in 15.16 seconds


What could possibly be wrong? The non-aliased address seems fine:

janitors-Mac-mini:~ id$ nmap 192.168.0.50 -PN

Starting Nmap 5.21 ( http://nmap.org ) at 2010-06-03 13:56 BST
Nmap scan report for 192.168.0.50
Host is up (0.00066s latency).
Not shown: 965 closed ports, 31 filtered ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
548/tcp  open  afp
9091/tcp open  unknown

Nmap done: 1 IP address (1 host up) scanned in 6.18 seconds


On Wed, Jun 2, 2010 at 9:53 PM, Dreamcat Four <email@hidden> wrote:
> 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

  • Prev by Date: Problem setting up alias ip address
  • Next by Date: AppleVPN / Cisco IPSec traffic not visible via virtual network interface (utun0)
  • Previous by thread: Problem setting up alias ip address
  • Next by thread: AppleVPN / Cisco IPSec traffic not visible via virtual network interface (utun0)
  • Index(es):
    • Date
    • Thread