Connect to internal lan using PPP

From: Drew Robertson (drewmailathome_at_optusnet.com.au)
Date: 11/25/03

  • Next message: Nathan Kinkade: "Re: KDE and US International keyboard"
    Date: Wed, 26 Nov 2003 02:20:58 +1100
    To: freebsd-questions@FreeBSD.ORG
    
    

    Hi all,

    I've set up my freebsd box to accept incoming connections via userPPP as
    per the handbook using mgetty and autoPPP.

    It's currently the default gateway for an internal lan and I'd like to
    enable dial in users to access both network and internet services. It's
    IP 192.168.1.1.

    It is dual homed with 2 net cards (plus a modem), one external for
    internet cable, one internal for home and runs natd for the other local pc.

    Everything works fine. Home network sharing, samba etc, even dial out.

    PPP will accept an incoming connection and allow log on for a user on my
    modem on ttyd0, assigning a dynamic IP address in the range between
    192.168.1.100-199.

    On the client side, usually WINDOWS 98 from a friends house, I cannot
    see anything. No PC's in net neighbourhood, no internet, and i cannot
    ping either of the PC's at home. There are entries in the hosts file
    for both home clients.

    If i do an IPCONFIG from the windows client, it will reply as:

    IP Address: 192.168.1.199
    S/N: 255.255.255.0
    Default Gateway: 192.168.1.199

    If i delete this route on the windows client (route delete 0.0.0.0) and
    add the correct route (route add 0.0.0.0 192.168.1.1), it shows up under
    IPCONFIG correctly as:

    IP Address: 192.168.1.199
    S/N: 255.255.255.0
    default gateway: 192.168.1.1

    but I still cannot view the home LAN.

    I've changed ppp.conf and added a ppp.linkup, but when logging on
    externally i cannot fix what seems to be a routing/gateway issue.

    My config is pretty standard, but for reference please find it all below:

    MY RC.CONF FILE:

    gateway_enable="YES"
    hostname="MATRIX-SERVER"
    ifconfig_sis0="inet 192.168.1.1 netmask 255.255.255.0"
    ifconfig_tl0="DHCP"
    #defaultrouter="192.168.1.1"
    router_enable="YES"
    arpproxy_all="YES"
    local_startup="/usr/local/etc/rc.d /etc"
    inetd_enable="YES"
    kern_securelevel_enable="NO"
    linux_enable="YES"
    lpd_enable="YES"
    moused_enable="YES"
    #moused_flags="-z 5"
    moused_port="/dev/psm0"
    moused_type="auto"
    nfs_reserved_port_only="YES"
    saver="fire"
    blanktime="180"
    sendmail_enable="NONE"
    #sshd_enable="YES"
    usbd_enable="YES"
    firewall_enable="YES"
    firewall_type="OPEN"
    natd_enable="YES"
    natd_flags="-f /etc/natd.conf"
    nfs_server_enable="YES"
    portmap_enable="YES"
    nfs_client_enable="YES"

    MY PPP.CONF FILE:

    default:
      set log Phase Chat LCP IPCP CCP tun command
      ident user-ppp VERSION (built COMPILATIONDATE)

      # Ensure that "device" references the correct serial port
      # for your modem. (cuaa0 = COM1, cuaa1 = COM2)
      #
      set device /dev/cuaa0

      set speed 115200
      set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
                \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
      set timeout 0 # 3 minute idle timer (the default)
      enable dns # request DNS info (for resolv.conf)
      allow users matrix_admin pentium ppp courtobrien

    pap:
      enable pap
      enable passwdauth
      set ifaddr 192.168.1.99 192.168.1.100-192.168.1.199 255.255.255.0
      #add 0.0.0.0 192.168.1.1
      accept dns
      set dns 203.2.75.132
      enable proxy

    #cuaa0:
    # set ifaddr 192.168.1.99 192.168.1.100-192.168.1.199 255.255.255.0
    # add default MYADDR
    # enable passwdauth
    # allow users matrix_admin pentium courtobrien ppp
    # accept dns
    # set dns 203.2.75.132
    # enable proxy

    ttyd0:
      set ifaddr 192.168.1.99 192.168.1.100-192.168.1.199 255.255.255.0
      add 192.168.1.1
      enable passwdauth
      accept dns
      set dns 203.2.75.132
      enable proxy

    optusnet:
      #
      # edit the next three lines and replace the items in caps with
      # the values which have been assigned by your ISP.
      #

      set phone 6666666666
      set authname username
      set authkey password

      set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
      add default HISADDR # Add a (sticky) default route

    MY PPP.LINKUP FILE

    MYADDR:
      delete ALL
      add 0 0 HISADDR

    Going through the PPP.LOG, it seems to rely on the pap section of
    PPP.CONF and I notice a error when the default route is being set.

    WARNING: add route failed: 0.0.0.0/0 already exists.

    It has to be something easy I've overlooked, but I'm spending all my
    girlfriends money on phone calls!!!

    Cheers,

    DR

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Nathan Kinkade: "Re: KDE and US International keyboard"

    Relevant Pages

    • Re: One computer on 2 networks
      ... The gateway setting on the 172.30 NIC should be blank. ... If they are not all 172.30 you need to use a shorter network mask (so ... How exactly would the Route Add sentence be? ... and yours must point to the Internet gateway. ...
      (microsoft.public.windows.server.networking)
    • Re: Dual NICs on Server 2003 issue
      ... To route a particular set of addresses to some other ... gateway you need to use static routing. ... connects via another gateway to a remote site that is on a 10.0.1.x ... assuming you have two internet access? ...
      (microsoft.public.windows.server.networking)
    • Re: No network connection through hub
      ... > When connecting it directly to a windows computer via a crossover ... Sounds like a routing problem check your route ... this will show you your default gateway, you need to set the gateway to the ... IP of the machine on the internet (or the next hop out if this is the ...
      (comp.os.linux.networking)
    • Re: Default gateway
      ... I have added the route and everything is working. ... "Bill Grant" wrote: ... > You can only have one active default gateway. ... people can't connect to the server from the internet. ...
      (microsoft.public.windows.server.networking)
    • Re: Weird net connection problem
      ... Lets say that you have your own /24 network that ... The internet knows nothing. ... my sloppy writing - I mean the set of routers that go to make up ... for the high-speed route from the Tunnel to St Pancras not only cut the ...
      (uk.comp.sys.mac)