- 论坛徽章:
- 0
|
# cat /etc/rc.conf
# -- sysinstall generated deltas -- # Sun Jun 11 21:44:31 2006
# Created: Sun Jun 11 21:44:31 2006
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
ifconfig_xl0="inet 192.168.1.2 netmask 255.255.255.0"
ifconfig_xl1="inet 192.168.0.1 netmask 255.255.255.0"
defaultrouter="192.168.1.1"
hostname="www.blabla.com"
gateway_enable="YES"
linux_enable="YES"
sshd_enable="YES"
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="adsl"
firewall_enable="NO"
sendmail_enable="NONE"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
syslogd_enable="YES"
syslogd_flags="-ss"
clear_tmp_enable="YES"
# cat /etc/ppp/ppp.conf
#################################################################
# PPP Sample Configuration File
# Originally written by Toshiharu OHNO
# Simplified 5/14/1999 by wself@cdrom.com
#
# See /usr/share/examples/ppp/ for some examples
#
# $FreeBSD: src/etc/ppp/ppp.conf,v 1.10 2004/11/19 17:12:56 obrien Exp $
#################################################################
default:
set log Phase Chat LCP IPCP CCP tun command
set ifaddr 192.168.1.1/0 192.168.1.2/0
enable dns
adsl:
set device PPPoE l0
set authname bla@163.bla
set authkey BLABLA
set dial
set login
add default HISADDR
# cat /etc/ppp/ppp.linkup
#########################################################################
#
# Example of ppp.linkup file
#
# This file is checked when ppp establishes a connection.
# ppp searches the labels in this file as follows:
#
# 1) The label that matches the IP number assigned to our side.
#
# 2) The label specified on the command line to ppp.
#
# 3) If no label has been found, use MYADDR if it exists.
#
#
# $FreeBSD: src/share/examples/ppp/ppp.linkup.sample,v 1.2 1999/08/28 00:19:31 peter Exp $
#
#########################################################################
# It is no longer necessary to re-add the default route here as our
# ppp.conf route is `sticky' (see the man page).
# If you're into sound effects when the link comes up, you can run
# ``auplay'' (assuming NAS is installed and configured).
#
adsl:
!bg /home/bla/ddns.sh > /dev/null
# cat ddns.sh
#!/bin/sh
IP=`ifconfig tun0 | grep inet | awk '{print $2}'`;
/usr/local/bin/wget -q "http://dyn.2mydns.com/dyn.asp?username=bla&password=bla&hostname=bla.2mydns.com&myip=$IP" -O /dev/null; |
|