OSX has features like Nat (Network-address translation) for sharing your internet-connection. Unfortunately Apple did forget
to integrate all these nice things into the OS.
You cant change the parameters of the ppp-daemon, you have to login to
startup the internet-connection. with a litte editing in the shell all this
can be done.
I made three startup-scripts: a caching name-server, automatic start for
ppp, nat, and a small readme-file. If you like to try it out, download
Since OSX 10.1.1 you can have TCP/IP in the Classic Environment enven when
Do the Following:
In the Network Settings, make two setups, the primary for your internal ethernet, the secondary for your PPP-Connection. in the PPP-Settings, Click
the PPPoE Options Button, uncheck all checkboxes.
Make shure you put your providers nameserver in the /etc/resolv.conf, NOT
your own nameserver running in your private network. Install my scripts. As
the result, classic will use the PPP settings, and will have internet in the
outside network. Still this is not perfect, since I would like to have my
Classic in my internal network. Also OSX will now use the Providers
name-server instead of the own. This will slow down name-lookups a little.
But Your clients still will use your own name-server.
I also made a litte enhancements to the watchpppd-script:
It now is made of two parts: pidof and watchpppd.
The pidof script will give the PID for a running process, also its much
simpler now with awk then with sed. the watchpppd will use the pidof and
watch if pppd still is running.
Two more scripts which maybe come in handy:
killall which will kill all processes of a
given name. No more fiddling around with ps -x, kill -KILL 12345. Should be
put in the /usr/sbin folder of you system. uses pidof.
A copy of the killall is hupall which will send
a HUP and not a QUIT as default.
Make shure all scripts are at least owned by root and executable by root
and executable by anyone (chmod 755).
Because of unknown reasons the energy saver terminates the connection after a
period of inactivity. a simple fix:
looks like if OSX goes into low-power-mode, the ppp daemon is terminated if
no network-activity happens, even when you checked never in the
to make you stay online a ping to your primary name-server every 10 or 20
minutes will fix this problem.
edit your /etc/crontab (must be root or sudo).
add a line like:
b" /10 * * * * root /sbin/ping -n -c 1 18.104.22.168 >>
will execute a ping every 10 minutes and log it into the system log. If you
dont like loggin replace the ">> /var/log/system.log" with "> NUL".
where: 22.214.171.124 is your primary name-server or any ip you know which
should be online.
after making the edits, do a reboot or send a HUP signal to the cron daemon.
otherwise your changes wont be seen.
If your PPPoE connection drops because your provider will hangup the
pppd-daemon will terminate. This is a script
which will watch if pppd is running and will restart it if not. Extract it
and copy it to the /usr/sbin folder, then ad a line to your
*/20 * * * * root /usr/sbin/watchpppd >>
which will look all 20 Minutes if pppd is running and will restart it if
neccessary and send a HUP to Natd.
Close the security hole of OSX displaying username and pass with ps -alwwwx | grep pppd:
pppd is able to take its arguments from a file. If you change your Startup
Script to use the options file instead of appending all parameters to pppd
nobody else then root should be able to know about your username and
To make an options file, copy the pppd options (ps -alwwx | grep pppd) to the clipboard
then create the directory /etc/ppp
open a new file there, call it options
paste the contents of the clipboard.
now, most options are 2 words, some are only one.
replace the spaces between the options with newlines.
so you will end up like this:
# note here: if your username contains characters like the @ enclose the username with quotes!
your actual file maybe will look a little different from mine.
save the file, make it readable only for root (chmod 600 options) otherwise anybody will be able to see the contents.
Of course this configuration will only work if you stop starting and configuring pppd with the OSX supplied tools.
I start it via a script in /Library startup-items.