DHCP and NAT not working

Discussion in 'Mac OS X Server, Xserve, and Networking' started by Karatehero, Oct 20, 2011.

  1. Karatehero macrumors member

    Joined:
    Jan 5, 2004
    Location:
    Pittsburgh
    #1
    So. I'm trying to setup my laptop to work some magic. I have a 4G aircard for my laptop. I'd like to be able to take it into the field, and have my laptop provide internet access to a few other machines as well as provide remote VPN to external users.

    I would think I want to setup DHCP for the internal users with NAT to share the internet connection, DNS to provide name resolution and the firewall to stop the baddies and stupids. I woudl also want to enable the VPN access with a password.

    I found that the gateway setup wizard under NAT in server admin sets that up for me perfect. It turns on DHCP(which I need to change from 192.168.1 to 10. something), DNS, NAT and the firewall all while asking me a password for my external VPN users. Perfect.

    Problem is it doesn't work, and I have no clue as to why. It appars my setup is all OK, but when I plug in my windows 7 laptop and ask for DHCP info, I get no reply.

    If I hard code my windows laptop to 192.168.1.10, I can ping my 'server' without a problem. If I plug my windows 7 laptop into my linksys router, it gets an IP without issue.

    So, am I missing something? I reformatted my laptop and tried to install it from a bare install with no luck. Is there something else I need to do? Could this be a DNS issue?

    Thanks!!!!!!! This is driving me batty!
     
  2. Macman45 macrumors demi-god

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #2
    Check Your Channel

    Remember, windows can only use CH 2.5, if your using a Mac, and your router is using channel 5 they won't see each other.
     
  3. Karatehero thread starter macrumors member

    Joined:
    Jan 5, 2004
    Location:
    Pittsburgh
    #3
    I'll be honest, I'd love to also get this working with wifi on the laptop, but I can't even get the wired connection to work. That's what you meant, wireless, right? That nat wizard gives you the option of wired and wireless, but if wired doesn't work, I can't see that wireless would.
     
  4. Macman45 macrumors demi-god

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #4
    Your Right

    If they won't work with an ethernet cable, then I'd look at your firewall. Test it by disabling it, see if you can connect, then check your allowed port settings.
     
  5. Karatehero thread starter macrumors member

    Joined:
    Jan 5, 2004
    Location:
    Pittsburgh
    #5
    So, I think I got DHCP working - it needed an LDAP server. I made one up. server.something.com

    DO I have to manually setup DNS also?
     
  6. Karatehero thread starter macrumors member

    Joined:
    Jan 5, 2004
    Location:
    Pittsburgh
    #6
    So, last spam, promise. I got DHCP and DNS working now. I just can't get outside from my laptop. I can't get to google.com or 74.125.225.19. It would appear that my NAT isn't really working. Seems pretty simple actually, all I did was select my adapter in Server Admin. Is it more complicated than that?

    thanks!!!!
     
  7. Macman45 macrumors demi-god

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #7
    Make And Model Of Router?

    That will help....BTW if yours was SPAM I wouldn't be answering!
     
  8. Karatehero thread starter macrumors member

    Joined:
    Jan 5, 2004
    Location:
    Pittsburgh
    #8
    Good point, I guess making progress isn't spamming.

    The only thing I can't sort out is why NAT isn't working. It appears that by using that wizard turns on internet connection sharing under sharing in system preferences. I guess that makes sense. There just isn't anything to play with nat.

    My wired connection is setup so it's gateway is itself. Is that right? Would it be the other adapter or something?
     
  9. Macman45 macrumors demi-god

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #9
    Yes

    You have a hard wired (ethernet) connection, and a wifi router....? The make of both modem and router (if they are separate) will help.
     
  10. Karatehero thread starter macrumors member

    Joined:
    Jan 5, 2004
    Location:
    Pittsburgh
    #10
    Oh, sorry, I'm not using the router.

    I have my mac setup with a 4g card for internet access. I have wifi disabled. I have my wired connection setup with a static IP of 10.8.0.210.

    I have my mac setup as a DHCP, DNS and NAT server right now. It would appear that the DHCP and DNS part work. My windows laptop can get an IP address and ping the server by name. NAT is not working as my windows 7 laptop can't get to the net. My mac can, but I presume since the 4g card is 1st in the 'binding order' that its using that to get to the net.

    My windows laptop can't get to google by name or by IP. I'm guess that means that something is wrong with my bridge between my wired connection and my 4g connection. Since its so easy to setup NAT on a mac, I'm guessing that something is wrong with the way my settings are.

    My 4g modem has its own IP, subnet, router, and DNS servers it retrieved from its DHCP server.

    My wired connection has an IP of 10.8.0.210, mask of 255.255.255.0, router of 10.8.0.210, DNS of 10.8.0.210, and the same 2 DNS servers the 4g card has giving it 3 DNS servers. I also gave it a search domain of test.com.

    The DHCP server is setup to give up IPs from 10.8.0.211-235, 255.255.255.0, gateway of 10.8.0.210, DNS of 10.8.0.210 plus the same 2 DNS servers my 4G card grabbed. I filled in the LDAP info with dc=server,dc=test,dc=com.

    So, thats it. I doubt this is a straight DNS issue since I can' get to google by IP address. Any chance that I have NAT or something setup wrong?

    thanks!
     
  11. Macman45 macrumors demi-god

    Macman45

    Joined:
    Jul 29, 2011
    Location:
    Somewhere Back In The Long Ago
    #11
    Looks Okay

    To me. You could try letting your mac roam instead of locking to a static address, I'm not too well up on those 4G modems I'm afraid, but others here will know!
     
  12. PinkyMacGodess macrumors 68040

    PinkyMacGodess

    Joined:
    Mar 7, 2007
    Location:
    Midwest America.
    #12
    I've had problems with forwarding through DNS before.

    Also, check that the device you are using doesn't already NAT the connection. Double NAT'ing will kill the connection too.
     
  13. rwwest7 macrumors regular

    Joined:
    Sep 24, 2011
    #13
    What is the MAC equivalent of a routing table?
     
  14. matspekkie macrumors member

    Joined:
    Oct 19, 2010
    #14
    too complicated?

    If i understand you right you want to share your internet connection. The easiest way to to this set your network adapter (lan) to a static address go to sharing than internetsharing select share via ethernet select your 4g card active and that should be it. Mind you this works on 192.168.2.xxx so you cannot have 192.168.2.xxx on wan side. as far as vpn this will probably never work since the 4g card will prob not have an static ip address also it will have to be able to pass l2tp data etc etc. hope it helps.


     
  15. bjgo macrumors newbie

    Joined:
    Jan 12, 2012
    #15
    solved! very similar problem

    Hi! I just solve very similar problem. Instead of 4G I use 3G-modem from huawei. Same symptoms — great dns/dhcp but no internet connection on clients.
    First I check BSD-name of my modem. It was ppp0, but Server Admin told me it is a HUAWEIMobile, so I just go to /etc/nat and open natd.conf where manually edit from
    Code:
    <key>interface</key>
    <string>HUAWEIMob</string>
    to
    Code:
    <key>interface</key>
    <string>ppp0</string>
    and restart nat. After that all works well.
     

Share This Page