Dirk-Willem van Gulik
|
10
|
 |
|
12-13-2002 04:25 PM ET (US)
|
|
Edited by author 12-13-2002 04:27 PM
Not sure why you need this on macosx - when we have this situation on the boat we usually use the 'Share' panel on the connected machine- and simply share ethernet/wireless and NAT through whatever net connection you have as appropriate. Works for wired, wireless, PPPoE, AOL crap, VPN's (PPTP en IPsec) and of course things like ppp to GPRS.
Note that your internet traffic will go through the existing route; the wire/wireless net is a 10.0.0/24 dhcp-ed.
If you want to; you can do it manually with
sudo -s /sbin/ifconfig en1/0 -> real IP is OLD /sbin/ifconfig en0/1 alias 10.0.0.1 sysctl -w net.inet.ip.forwarding=1 /usr/sbin/natd -alias_address OLD -use_sockets -same_ports -unregistered_only bootpd (assuming you set up the file for 10.0.0/24)
You can also specify the settings on the cmd line if you want for bootpd.
But that is basically what you do when you use the Share option. (Preferences -> "Internet & Network" -> Sharing.
Note that for silly reasons it only works if you already have an internet connection. You can spoof that with a cable if needed.
|