# propppd configuration - L2TPv2 LNS

system {
    # Set the log mask of individual log message categories which are
    # output. Messages are grouped into categories which may be individually
    # controlled. The debug level of individual ppp instances can be controlled
    # by management commands.
    log_categories {
        mgmt notice
        event notice
        radius debug
        ppp notice
	main notice
	license notice
	config notice
    }

    log_targets {
        # The main log target is either syslog or file, set by command line
        # options.
        main {
            # Set the verbosity level at which messages are output by propppd to
            # syslog or log file. Values match traditional Unix syslog levels,
            # namely debug, info, notice, warning, error. Default is info.
            log_level		debug
        }
    }
}

# The default profile sets the options to use for all instances that
# do not indicate a specific profile to use.

profile "default" {
   # Sets the local and remote IP address to assign in the format
   # '<local-ip>:<remote-ip>'. In this config, all local PPP instances
   # share the same IP 10.5.1.100. The remote (peer) IP is assigned by
   # RADIUS.
   10.5.1.100:

   # Forces PPP connections to authenticate. Disable unwanted auth protocols.
   auth
   # refuse-pap
   # refuse-chap
   # refuse-eap

   # Enable PPP LCP Echo. Send Echo request every 30s.
   lcp-echo-interval 30
   lcp-echo-failure 3

   # PPP compress options
   noaccomp
   nobsdcomp
   nodeflate
   nopcomp
   novj
   novjccomp

   # Disable a default IP address being assigned by PPP in case RADIUS
   # does not assign one. We want the connection to fail if IP
   # addresses are not assigned.
   noipdefault

   # Enable RADIUS auth. Set values for NAS-Identifier, NAS-IP-Address
   # and NAS-Port-Type RADIUS attributes so that the RADIUS server may
   # use these in its auth and address assignment decisions.
   radius
   rad-nas-id prol2tp-lns
   rad-nas-ip-addr 10.42.42.10
   rad-nas-port-type 5

   # Enable RADIUS accounting and send RADIUS accounting interim
   # updates to the RADIUS server every 600s. Interim updates report
   # data usage of the connection which may be useful for local
   # traffic monitoring.
   rad-acct
   rad-acct-interim-interval 600
}

# The RADIUS block defines one or more RADIUS servers.

radius {
    # Most RADIUS servers are configured with a password to
    # authenticate requests. Set the server's IP address and password.
    server "one" {
        secret "myradsecret1"
        server_address 10.42.42.20

        # Ports to be used for auth and acct requests to this server. Defaults
        # are 1812 (auth) and 1813 (acct). Set to zero to disable auth or acct.
        #auth_port 1812
        #acct_port 1813

        # How long to wait for a response before retrying. Default 1s.
        #timeout 1
        # How many times to retransmit. Default 3.
        #max_retries 3
        # How long to treat the server as unreachable if it did not respond to a
        # request before using it again for new requests. Default 60s.
        #dead_time 60
    }

    # RADIUS Disconnect is a feature that allows a RADIUS server or
    # other admin tool to disconnect a PPP instance by sending a
    # RADIUS request to propppd. To disable it, don't define a
    # disconnect config block here.
    disconnect {
    	# Local IP address and port to listen on for RADIUS Disconnect packets.
        local_disc_address 10.42.42.10
        local_disc_port 5000

	# Define list of clients from which we allow Disconnect
	# requests. For each client, define its IP address and the
	# secret to be used to authenticate it.
        radius_disc_client "radserverd" {
            peer_address 10.42.42.20
            secret "myradsecret1"
        }
        radius_disc_client "nocadmin" {
            peer_address 10.42.42.29
            secret "myradsecret42"
        }
    }
}
