Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root:~]# cat /usr/local/etc/mpd5/mpd.conf
- #################################################################
- #
- # MPD configuration file
- #
- # This file defines the configuration for mpd: what the
- # bundles are, what the links are in those bundles, how
- # the interface should be configured, various PPP parameters,
- # etc. It contains commands just as you would type them
- # in at the console. Lines without padding are labels. Lines
- # starting with a "#" are comments.
- #
- # $Id: mpd.conf.sample,v 1.46 2009/04/29 11:04:17 amotin Exp $
- #
- #################################################################
- startup:
- # configure mpd users
- set user adm admin
- set user adm adm
- # configure the console
- set console self 127.0.0.1 5005
- set console open
- # configure the web server
- set web self 0.0.0.0 5006
- set web open
- #
- # Default configuration is "dialup"
- default:
- load pptp_server
- pptp_server:
- #
- # Mpd as a PPTP server compatible with Microsoft Dial-Up Networking clients.
- #
- # Suppose you have a private Office LAN numbered 192.168.1.0/24 and the
- # machine running mpd is at 192.168.1.1, and also has an externally visible
- # IP address of 1.2.3.4.
- #
- # We want to allow a client to connect to 1.2.3.4 from out on the Internet
- # via PPTP. We will assign that client the address 192.168.1.50 and proxy-ARP
- # for that address, so the virtual PPP link will be numbered 192.168.1.1 local
- # and 192.168.1.50 remote. From the client machine's perspective, it will
- # appear as if it is actually on the 192.168.1.0/24 network, even though in
- # reality it is somewhere far away out on the Internet.
- #
- # Our DNS server is at 192.168.1.3 and our NBNS (WINS server) is at 192.168.1.4.
- # If you don't have an NBNS server, leave that line out.
- #
- # Define dynamic IP address pool.
- set ippool add pool1 192.168.0.10 192.168.0.20
- # Create clonable bundle template named B
- create bundle template B
- set iface enable proxy-arp
- set iface idle 1800
- set iface enable tcpmssfix
- set ipcp yes vjcomp
- # Specify IP address pool for dynamic assigment.
- set ipcp ranges 192.168.0.1/32 ippool pool1
- set ipcp dns 8.8.8.8
- # set ipcp nbns 192.168.1.4
- # The five lines below enable Microsoft Point-to-Point encryption
- # (MPPE) using the ng_mppc(8) netgraph node type.
- set bundle enable compression
- set ccp yes mppc
- set mppc yes e40
- set mppc yes e128
- set mppc yes stateless
- # Create clonable link template named L
- create link template L pptp
- # Set bundle template to use
- set link action bundle B
- # Multilink adds some overhead, but gives full 1500 MTU.
- set link enable multilink
- set link yes acfcomp protocomp
- set link no pap chap eap
- set link enable chap
- # We can use use RADIUS authentication/accounting by including
- # another config section with label 'radius'.
- # load radius
- set link keep-alive 10 60
- # We reducing link mtu to avoid GRE packet fragmentation.
- set link mtu 1460
- # Configure PPTP
- set pptp self PUBLIC_IP
- # Allow to accept calls
- set link enable incoming
- set link fsm-timeout 5
- [root:~]# cat /etc/pf.conf
- #### VARIABLES
- eth_if = "re0"
- ...
- table <allowed_vpn> { 192.168.0.1/24 }
- set block-policy return
- nat on $eth_if from <allowed_vpn> to any -> ($eth_if)
- ...
- #### RULES
- set skip on lo0
- ...
- [root:~]# cat /var/log/mpd5.log
- Dec 20 14:46:21 ks389431 mpd: [L-1] Accepting PPTP connection
- Dec 20 14:46:21 ks389431 mpd: [L-1] Link: OPEN event
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: Open event
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: state change Initial --> Starting
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: LayerStart
- Dec 20 14:46:21 ks389431 mpd: [L-1] PPTP: attaching to peer's outgoing call
- Dec 20 14:46:21 ks389431 mpd: [L-1] Link: UP event
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: Up event
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: state change Starting --> Req-Sent
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: SendConfigReq #1
- Dec 20 14:46:21 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:21 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:21 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:21 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:21 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:21 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:21 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:21 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Req-Sent)
- Dec 20 14:46:21 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:21 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:21 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:21 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:21 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:21 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:21 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:21 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:21 ks389431 mpd: [L-1] LCP: state change Req-Sent --> Ack-Sent
- Dec 20 14:46:24 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:24 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:24 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:24 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:24 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:24 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:24 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:24 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:24 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:24 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:26 ks389431 mpd: [L-1] LCP: SendConfigReq #2
- Dec 20 14:46:26 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:26 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:26 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:26 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:26 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:26 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:26 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:26 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:27 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:27 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:27 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:27 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:27 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:27 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:27 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:27 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:27 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:27 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:30 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:30 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:30 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:30 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:30 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:30 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:30 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:30 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:30 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:30 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:31 ks389431 mpd: [L-1] LCP: SendConfigReq #3
- Dec 20 14:46:31 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:31 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:31 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:31 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:31 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:31 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:31 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:31 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:33 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:33 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:33 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:33 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:33 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:33 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:33 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:33 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:33 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:33 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:36 ks389431 mpd: [L-1] LCP: SendConfigReq #4
- Dec 20 14:46:36 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:36 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:36 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:36 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:36 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:36 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:36 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:36 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:36 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:36 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:36 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:36 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:36 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:36 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:36 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:36 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:36 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:36 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:39 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:39 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:39 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:39 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:39 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:39 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:39 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:39 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:39 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:39 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:41 ks389431 mpd: [L-1] LCP: SendConfigReq #5
- Dec 20 14:46:41 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:41 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:41 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:41 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:41 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:41 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:41 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:41 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:42 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:42 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:42 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:42 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:42 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:42 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:42 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:42 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:42 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:42 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:45 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:45 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:45 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:45 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:45 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:45 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:45 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:45 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:45 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:45 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:46 ks389431 mpd: [L-1] LCP: SendConfigReq #6
- Dec 20 14:46:46 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:46 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:46 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:46 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:46 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:46 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:46 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:46 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:48 ks389431 mpd: [L-1] LCP: rec'd Configure Request #1 (Ack-Sent)
- Dec 20 14:46:48 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:48 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:48 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:48 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:48 ks389431 mpd: [L-1] LCP: SendConfigAck #1
- Dec 20 14:46:48 ks389431 mpd: [L-1] ACCMAP 0x00000000
- Dec 20 14:46:48 ks389431 mpd: [L-1] MAGICNUM 1652bd1d
- Dec 20 14:46:48 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:48 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: SendConfigReq #7
- Dec 20 14:46:51 ks389431 mpd: [L-1] ACFCOMP
- Dec 20 14:46:51 ks389431 mpd: [L-1] PROTOCOMP
- Dec 20 14:46:51 ks389431 mpd: [L-1] MRU 1500
- Dec 20 14:46:51 ks389431 mpd: [L-1] MAGICNUM 8d88eed4
- Dec 20 14:46:51 ks389431 mpd: [L-1] AUTHPROTO CHAP MSOFTv2
- Dec 20 14:46:51 ks389431 mpd: [L-1] MP MRRU 2048
- Dec 20 14:46:51 ks389431 mpd: [L-1] MP SHORTSEQ
- Dec 20 14:46:51 ks389431 mpd: [L-1] ENDPOINTDISC [802.1] 38 60 77 1a f2 ee
- Dec 20 14:46:51 ks389431 mpd: [L-1] PPTP call terminated
- Dec 20 14:46:51 ks389431 mpd: [L-1] Link: DOWN event
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: Close event
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: state change Ack-Sent --> Closing
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: SendTerminateReq #8
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: Down event
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: LayerFinish
- Dec 20 14:46:51 ks389431 mpd: [L-1] LCP: state change Closing --> Initial
- Dec 20 14:46:51 ks389431 mpd: [L-1] Link: SHUTDOWN event
- Dec 20 14:46:51 ks389431 mpd: [L-1] Link: Shutdown
- [root:~]# ifconfig re0
- re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
- options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
- ether 38:60:77:1a:f2:ee
- inet PUBLIC_IP netmask 0xffffff00 broadcast 176.31.96.255
- inet6 fe80::3a60:77ff:fe1a:f2ee%re0 prefixlen 64 scopeid 0x1
- inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
- nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
- media: Ethernet autoselect (100baseTX <full-duplex>)
- status: active
Advertisement
Add Comment
Please, Sign In to add comment