Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This blank configuration will automatically use DHCP for any net.*
- # scripts in /etc/init.d. To create a more complete configuration,
- # please review /etc/conf.d/net.example and save your configuration
- # in /etc/conf.d/net (this file :]!).
- modules=("iproute2" "!ifconfig")
- #local
- config_eth0=("172.16.128.8 netmask 255.255.255.0 brd 172.16.128.255")
- #2dsl
- config_eth1=("null")
- #RST
- config_ppp0=( "ppp" )
- link_ppp0="eth1"
- plugins_ppp0=("pppoe")
- username_ppp0='login'
- password_ppp0='pass'
- routes_ppp0=("85.28.192.0/18 dev ppp0 src 77.182.83.7 table DSL"
- "77.182.0.0/16 dev ppp0 src 77.182.83.7 table DSL"
- "default via 85.28.192.67 table DSL")
- rules_ppp0=("from src 77.182.83.7 table DSL")
- pppd_ppp0=(
- "usepeerdns"
- "noauth"
- #"defaultroute"
- logfile /var/log/pptp-client.log
- )
- depend_ppp0()
- {
- need net.eth1
- }
- #beeline
- modules_ppp10=("dhcpcd" )
- dhcpcd_ppp10=("-t 10")
- dhcp_ppp10=("release nodns nontp nonis" )
- config_ppp10=( "ppp" )
- link_ppp10="/dev/ttyUSB2"
- username_ppp10='beeline'
- password_ppp10='beeline'
- pppd_ppp10=(
- "persist"
- "noauth"
- "deflate 0"
- "asyncmap 0"
- "noipdefault"
- "mru 1492"
- "mtu 1492"
- )
- chat_ppp10=(
- 'ABORT' 'BUSY'
- 'ABORT' 'ERROR'
- 'ABORT' 'NO ANSWER'
- 'ABORT' 'NO CARRIER'
- 'ABORT' 'NO DIALTONE'
- 'ABORT' 'Invalid Login'
- 'ABORT' 'Login incorrect'
- 'TIMEOUT' '5'
- '' 'ATZ'
- 'OK' 'AT+CGDCONT=1,\"IP\",\"internet.beeline.ru\"'
- 'TIMEOUT' '60'
- 'OK' 'ATDT*99#'
- 'TIMEOUT' '5'
- '~--' ''
- )
- routes_ppp10=("10.64.64.0/24 dev ppp10 table BEELINE"
- "default via 10.221.187.70 table BEELINE")
- rules_ppp10=("from dev ppp10 table BEELINE")
- postup(){
- # This function could be used, for example, to register with a
- # dynamic DNS service. Another possibility would be to
- # send/receive mail once the interface is brought up.
- # Here is an example that allows the use of iproute rules
- # which have been configured using the rules_eth0 variable.
- #rules_eth0=(
- # "from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 100"
- # "from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100"
- #)
- local x="rules_${IFVAR}[@]"
- local -a rules=( "${!x}" )
- if [[ -n ${rules} ]] ; then
- einfo "Adding IP policy routing rules"
- eindent
- # Ensure that the kernel supports policy routing
- if ! ip rule list | grep -q "^" ; then
- eerror "You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)"
- eerror "in your kernel to use ip rules"
- else
- for x in "${rules[@]}" ; do
- ebegin "${x}"
- ip rule add ${x}
- eend $?
- done
- fi
- eoutdent
- # Flush the cache
- ip route flush cache dev "${IFACE}"
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment