Advertisement
MeaCulpa

conf.d-net

Nov 21st, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. # This blank configuration will automatically use DHCP for any net.*
  2. # scripts in /etc/init.d. To create a more complete configuration,
  3. # please review /usr/share/doc/openrc/net.example and save your configuration
  4. # in /etc/conf.d/net (this file :]!).
  5. #dhcp_eth0="nosendhost"
  6. #dns_domain_eth0="localdomain"
  7. #nis_domain_eth0="localdomain"
  8.  
  9. config_eth0="192.168.11.3 netmask 255.255.255.0"
  10. routes_eth0="default via 192.168.11.1"
  11. dns_servers_eth0="192.168.11.1 8.8.8.8 198.153.192.1"
  12.  
  13.  
  14. ########## VPN ###########
  15. config_ppp0="ppp"
  16. pppd_ppp0="persist
  17. call ofan
  18. holdoff 10
  19. mru 1460
  20. mtu 1460
  21. idle 600"
  22.  
  23. # Define default gateway, default device and VPN gateway:
  24. DEFgateway="192.168.11.1"
  25. DEFdevice="eth0"
  26. VPN="iofan.co.cc"
  27.  
  28. link_ppp0="pty \"pptp $VPN --nolaunchpppd\""
  29.  
  30. #This postup script is run after every network interface comes up
  31. postup(){
  32. if [[ ${IFACE} = ppp0 ]]; then
  33. route add -host $VPN gw $DEFgateway
  34. route add default dev ppp0
  35. route del default $DEFdevice
  36. fi
  37. return 0;
  38.  
  39. }
  40. postdown(){
  41. if [[ ${IFACE} = "ppp0" ]]; then
  42. route add default gw $DEFgateway dev $DEFdevice
  43. route del -host $VPN
  44. route del $VPN
  45. fi
  46. return 0;
  47. }
  48.  
  49.  
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement