NAT PPPoE for wireless in infrastructure mode

Yesurbius

Registered
Sorry if the title is confusion - not sure what would have been a better topic. I have a really oddball setup here. Here goes.

1. I have my Mac Mini connected via Ethernet to my ADSL modem, and has PPPoE configured. My Mac Mini has Airport wireless in it.

2. I have a Windows XP system in another room. It does NOT have a wireless card. I wish for it to have Internet access.

3. I have an Airport Extreme Base Station.

So what I have done is connected the Airport Base Station up to the Windows XP system via Ethernet. I configured the Base Station to assign DHCP addresses in the range of 172.24.55.3/24 to 172.24.55.25/24. I configured the Base Station to set the default router to be 172.24.55.2, and set the base station's IP to 172.24.55.1. I set my Mac Mini's Airport IP to a manual address of 172.24.55.2.

Everything works great - the XP box can ping the Airport as well as the Mac Mini, and has the default route setup for the Mac Mini. The Mac mini can ping the XP box. Great little Wireless network setup - that is easy.

Now I need to share my Ethernet connection with wireless clients. So I go into System Preferences -> Sharing -> Internet, and set it to share my Ethernet connection with my Airport interface. This is where it screws up. When you share your Airport connection, it automatically creates a network and goes into Ad-Hoc mode. This won't work obviously since the Airport is in infrastructure mode.

So to solve this, my guess is that I will have to break out the Terminal. Well I have many years experience with Linux and OpenBSD - but not with Darwin. While my pppoe connection is active, I do a "ps ax | grep ppp" and I see:

1762 ?? Ss 0:00.06 pppd serviceid C387082A-C5A2-11D9-8133-0011247708E6 optionsfd 0 plugin /System/Library/SystemConfiguration/PPPController.bundle/Contents/PlugIns/PPPDialogs.ppp logfile /var/log/ppp.log plugin PPPoE.ppp device en0 redialcount 1 redialtimer 30 mru 1492 mtu 1492 receive-all ipparam 172.24.55.1 0:0 noipdefault ipcp-accept-local ipcp-accept-remote usepeerdns +ipv6 ipv6cp-use-persistent noacsp noauth user myuserid@dslisp.net noccp refuse-eap noaskpassword nodetach

WOW - that is a little bit different of a commandline from other Unices I have been around. I checked the man page and while I do see some of the switches - I see nothing about serviceid - so I know that this is Apple's marvel.

I did a man on 'natd' and the man page told me to use the -nat switch for ppp if I was intending to do nat over a ppp link. Curiously enough there is no information in the pppd man page on the nat switch, and when you try entering it as a switch to pppd you get "Unrecognized Option".

I figured I would go ahead and try natd anyhow. First thing I did was bring up my PPPoE connection, then setup natd on it:

natd -interface ppp0

next, I added the divert chain to the firewall rules:

ipfw add divert natd ip from any to any via ppp0

It worked. Question is - is this the proper way or is there an easier way?
 
Back
Top