Follow us on...
Follow us on Twitter Follow us on Facebook
Register
Results 1 to 6 of 6
  1. #1
    kommakazi's Avatar
    kommakazi is offline Hack the Planet!@#
    Join Date
    Jan 2002
    Location
    /Users/peter
    Posts
    319
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to set up NAT w/ dial-up connection?

    Does anyone know how to set up NAT so that it will work with my dial-up connection? I have a setup right now that should work but doesn't. In my /Library/StartupItems I have a folder called 'NAT'. Inside that are two files, 'NAT', and 'StartupParameters.plist'. Here's how my NAT file is set up:

    #!/bin/sh

    ##
    # NAT enables internet connection to be shared.
    ##

    . /etc/rc.common

    ConsoleMessage "Starting NAT"

    ConsoleMessage "Setting NAT parameters"

    #ifconfig

    natd -dynamic -interface ppp0

    /sbin/ipfw -f flush
    /sbin/ipfw add divert natd all from any to any via en0
    /sbin/ipfw add pass all from any to any
    And my StartupParameters.plist file reads:

    {
    Description = "Network address translation";
    Provides = ("NAT");
    Requires = ("Network");
    OrderPreference = "Late";
    Messages =
    {
    start = "Starting network address translation services";
    stop = "Stopping network address translation services";
    };
    }
    ipforwarding is set to 'yes' in my hostconfig file... I don't know what I'm doing wrong! If anyone could help I would be greatly appreciative! Thanks!
    If it's a penny for your thoughts and you always put your two cents worth in, who's getting all these extra pennies?!

    The Home Network:
    iceBook: 500mhz G3, 384MB RAM, Mac OS X.II.II
    B&W Tower: 450mhz G3, 512MB RAM, Mac OS X.II.II
    Rev. A iMac: 233mhz G3, 256MB RAM, Mac OS 9.2.2
    Mac LC III+: 33mhz 68030, 12MB RAM, NetBSD 1.5.2
    Stupid PC: 233mhz Athalon K-6, 80MB RAM, Rhapsody DR2

  2. #2
    kommakazi's Avatar
    kommakazi is offline Hack the Planet!@#
    Join Date
    Jan 2002
    Location
    /Users/peter
    Posts
    319
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I scratched the method I attempted using above and instead followed the instructions in the natd man page itself, still to no avail. All my other computers still are unable to access the internet...when I attempt to they don't even seem to be trying to look on my LAN... Doesn't anyone here know *anything* about setting up natd? Please I'm getting really desperate...
    If it's a penny for your thoughts and you always put your two cents worth in, who's getting all these extra pennies?!

    The Home Network:
    iceBook: 500mhz G3, 384MB RAM, Mac OS X.II.II
    B&W Tower: 450mhz G3, 512MB RAM, Mac OS X.II.II
    Rev. A iMac: 233mhz G3, 256MB RAM, Mac OS 9.2.2
    Mac LC III+: 33mhz 68030, 12MB RAM, NetBSD 1.5.2
    Stupid PC: 233mhz Athalon K-6, 80MB RAM, Rhapsody DR2

  3. #3
    baur is offline Registered User
    Join Date
    Aug 2001
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The easy way: There used to be a program called GNAT (now called IPNetShareX) that I used about a year ago - worked great. I never looked into what was going on at as low a level as you're talking about.

  4. #4
    Eckhart is offline Baron in the Trees
    Join Date
    Jul 2002
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check clients' default routes/Change interfaces

    1.
    As you said: "All my other computers still are unable to access the internet...when I attempt to they don't even seem to be trying to look on my LAN..." I remembered having a similar problem once, when I had properly configured ipfw/natd yet forgotten to adjust the clients' default routes. So packages come in and they cannot respond, likewise not a single connection is established.

    2.
    Secondly, in my eyes, two lines in your configuration are incorrect:

    Explanation: The firewall gets the hands on the packets at first and checks every single packet if it is suitable for one of his rules, in your case, any packet automatically suits the first rule so it is send to the divert socket of natd. Put, as ipfw receives those packets form the internet, the correct interface would be ppp0. So, try this:

    > /sbin/ipfw add divert natd all from any to any via ppp0

    Now, all packets from ppp0 are delivered to natd, which then diverts them over the interface en0. So, try this:

    > natd -dynamic -interface en0

    Here we go, all should work now. I hope I could help you. It is getting late here in Europe. Bye

  5. #5
    Eckhart is offline Baron in the Trees
    Join Date
    Jul 2002
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Please excuse my inaccurate English in my previous post. But I feel the need to be exact on this. So, in my explanation, I meant to say:

    The firewall checks each packet, wether or not it fits for the first of his rules, then the second and so forth. And you wanted to have all packets from ppp0 to be worked off by natd, but you gave your rule the incorrect interface. That was my point, sorry for the second post. As I said, it's late here

  6. #6
    kommakazi's Avatar
    kommakazi is offline Hack the Planet!@#
    Join Date
    Jan 2002
    Location
    /Users/peter
    Posts
    319
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Already tried that, baur, the latest version didn't work, not to mention that they actually want me to pay for it! Why pay for something I can do for free?

    Eckhart, thank you for the reply, I changed my settings as you specified...but it still does not work. This is getting really frustrating !!!
    All my hosts are configured to look to my iBook for internet services, it's IP is set as the router address on all of them.

    Would it help if I let someone ssh into my computer and take a firsthand look at my configuration? I could set up a read only account for you, just shout out if you think you can help! Thanks!

    --edit--
    OK, I set up a basic account for someone to ssh in with, let me know if you would like to try it and I'll give you the details on it.
    Last edited by kommakazi; July 24th, 2002 at 10:26 PM.
    If it's a penny for your thoughts and you always put your two cents worth in, who's getting all these extra pennies?!

    The Home Network:
    iceBook: 500mhz G3, 384MB RAM, Mac OS X.II.II
    B&W Tower: 450mhz G3, 512MB RAM, Mac OS X.II.II
    Rev. A iMac: 233mhz G3, 256MB RAM, Mac OS 9.2.2
    Mac LC III+: 33mhz 68030, 12MB RAM, NetBSD 1.5.2
    Stupid PC: 233mhz Athalon K-6, 80MB RAM, Rhapsody DR2

 

 

Similar Threads

  1. Dial Up connection at start up
    By paolino in forum Mac OS X System & Mac Software
    Replies: 0
    Last Post: January 25th, 2003, 10:04 AM
  2. HOW TO STOP SPAM -- join the fight!
    By GadgetLover in forum Apple News, Rumors & Discussion
    Replies: 11
    Last Post: April 11th, 2002, 02:52 PM
  3. AppleScript, iTunes, Mp3 Tags, idea and problem
    By jove in forum Software Programming & Web Scripting
    Replies: 0
    Last Post: March 11th, 2002, 04:03 PM
  4. how would I zip files?
    By themacko in forum Mac OS X System & Mac Software
    Replies: 14
    Last Post: February 18th, 2002, 04:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •