Advertisement
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 /usr/share/doc/openrc/net.example and save your configuration
- # in /etc/conf.d/net (this file :]!).
- #dhcp_eth0="nosendhost"
- #dns_domain_eth0="localdomain"
- #nis_domain_eth0="localdomain"
- config_eth0="192.168.11.3 netmask 255.255.255.0"
- routes_eth0="default via 192.168.11.1"
- dns_servers_eth0="192.168.11.1 8.8.8.8 198.153.192.1"
- ########## VPN ###########
- config_ppp0="ppp"
- pppd_ppp0="persist
- call ofan
- holdoff 10
- mru 1460
- mtu 1460
- idle 600"
- # Define default gateway, default device and VPN gateway:
- DEFgateway="192.168.11.1"
- DEFdevice="eth0"
- VPN="iofan.co.cc"
- link_ppp0="pty \"pptp $VPN --nolaunchpppd\""
- #This postup script is run after every network interface comes up
- postup(){
- if [[ ${IFACE} = ppp0 ]]; then
- route add -host $VPN gw $DEFgateway
- route add default dev ppp0
- route del default $DEFdevice
- fi
- return 0;
- }
- postdown(){
- if [[ ${IFACE} = "ppp0" ]]; then
- route add default gw $DEFgateway dev $DEFdevice
- route del -host $VPN
- route del $VPN
- fi
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement