Guest User

Untitled

a guest
Aug 15th, 2011
311
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1.  
  2. # This blank configuration will automatically use DHCP for any net.*
  3. # scripts in /etc/init.d. To create a more complete configuration,
  4. # please review /etc/conf.d/net.example and save your configuration
  5. # in /etc/conf.d/net (this file :]!).
  6. modules=("iproute2" "!ifconfig")
  7. #local
  8. config_eth0=("172.16.128.8 netmask 255.255.255.0 brd 172.16.128.255")
  9.  
  10.  
  11. #2dsl
  12. config_eth1=("null")
  13.  
  14.  
  15.  
  16. #RST
  17. config_ppp0=( "ppp" )
  18. link_ppp0="eth1"
  19. plugins_ppp0=("pppoe")
  20. username_ppp0='login'
  21. password_ppp0='pass'
  22. routes_ppp0=("85.28.192.0/18 dev ppp0 src 77.182.83.7 table DSL"
  23. "77.182.0.0/16 dev ppp0 src 77.182.83.7 table DSL"
  24. "default via 85.28.192.67 table DSL")
  25. rules_ppp0=("from src 77.182.83.7 table DSL")
  26.  
  27. pppd_ppp0=(
  28. "usepeerdns"
  29. "noauth"
  30. #"defaultroute"
  31. logfile /var/log/pptp-client.log
  32. )
  33. depend_ppp0()
  34. {
  35. need net.eth1
  36. }
  37.  
  38. #beeline
  39. modules_ppp10=("dhcpcd" )
  40. dhcpcd_ppp10=("-t 10")
  41. dhcp_ppp10=("release nodns nontp nonis" )
  42. config_ppp10=( "ppp" )
  43. link_ppp10="/dev/ttyUSB2"
  44. username_ppp10='beeline'
  45. password_ppp10='beeline'
  46. pppd_ppp10=(
  47. "persist"
  48. "noauth"
  49. "deflate 0"
  50. "asyncmap 0"
  51. "noipdefault"
  52. "mru 1492"
  53. "mtu 1492"
  54. )
  55. chat_ppp10=(
  56. 'ABORT' 'BUSY'
  57. 'ABORT' 'ERROR'
  58. 'ABORT' 'NO ANSWER'
  59. 'ABORT' 'NO CARRIER'
  60. 'ABORT' 'NO DIALTONE'
  61. 'ABORT' 'Invalid Login'
  62. 'ABORT' 'Login incorrect'
  63. 'TIMEOUT' '5'
  64. '' 'ATZ'
  65. 'OK' 'AT+CGDCONT=1,\"IP\",\"internet.beeline.ru\"'
  66. 'TIMEOUT' '60'
  67. 'OK' 'ATDT*99#'
  68. 'TIMEOUT' '5'
  69. '~--' ''
  70. )
  71. routes_ppp10=("10.64.64.0/24 dev ppp10 table BEELINE"
  72. "default via 10.221.187.70 table BEELINE")
  73. rules_ppp10=("from dev ppp10 table BEELINE")
  74.  
  75.  
  76.  
  77. postup(){
  78. # This function could be used, for example, to register with a
  79. # dynamic DNS service. Another possibility would be to
  80. # send/receive mail once the interface is brought up.
  81. # Here is an example that allows the use of iproute rules
  82. # which have been configured using the rules_eth0 variable.
  83. #rules_eth0=(
  84. # "from 24.80.102.112/32 to 192.168.1.0/24 table localnet priority 100"
  85. # "from 216.113.223.51/32 to 192.168.1.0/24 table localnet priority 100"
  86. #)
  87. local x="rules_${IFVAR}[@]"
  88. local -a rules=( "${!x}" )
  89. if [[ -n ${rules} ]] ; then
  90. einfo "Adding IP policy routing rules"
  91. eindent
  92. # Ensure that the kernel supports policy routing
  93. if ! ip rule list | grep -q "^" ; then
  94. eerror "You need to enable IP Policy Routing (CONFIG_IP_MULTIPLE_TABLES)"
  95. eerror "in your kernel to use ip rules"
  96. else
  97. for x in "${rules[@]}" ; do
  98. ebegin "${x}"
  99. ip rule add ${x}
  100. eend $?
  101. done
  102. fi
  103. eoutdent
  104. # Flush the cache
  105. ip route flush cache dev "${IFACE}"
  106. fi
  107. }
Advertisement
Add Comment
Please, Sign In to add comment