发新话题
打印

Netbsd 配置备份

Netbsd 配置备份

netbsd 配置备份

cat /etc/rc.conf

wscons=YES
auto_ifconfig=YES
ifwatchd=YES

hostname="xxx"

ipfilter=YES
ipnat=YES
/sbin/sysctl -w net.inet.ip.forwarding=1

cat /etc/ipnat.conf

map pppoe0 192.168.x.x/24 -> 0/32 portmap tcp/udp 40000:60000
map pppoe0 192.168.x.x/24 -> 0/32

cat /etc/ipf.conf

pass in from any to any
pass out from any to any

cat /etc/sysctl.conf

net.inet.tcp.mss_ifmtu=1

mkdir /etc/ppp
touch /etc/ppp/ip-{up,down}

cat /etc/ppp/ip-up

#! /bin/sh
/sbin/route add default $5
# /etc/ppp/ip-up
/usr/sbin/ipnat -F
/usr/sbin/ipnat -C
/sbin/ipf -E
/usr/sbin/ipnat -f /etc/ipnat.conf

   cat /etc/ppp/ip-down

#! /bin/sh
/sbin/route delete default $5
# /etc/ppp/ip-down
/sbin/ipf -D
/usr/sbin/ipnat -C

cat /etc/ifconfig.pppoe0

create
! /sbin/ifconfig pcn0 up
! /sbin/pppoectl -e pcn0 $int
! /sbin/pppoectl $int myauthproto=chap 'myauthname=xxx' 'myauthsecret=xxx' hisauthproto=none
0.0.0.0 0.0.0.1 up

TOP

发新话题