# /etc/conf.d/local.start ## hack to make net.tun0 start after openvpn /etc/init.d/net.tun0 start # This is a good place to load any misc programs # on startup (use &>/dev/null to hide output) # Create the tunnel! There should probably be a proper way to set this up. #echo "Creating the tunnel and the 10.0.201.0/24 route" #iptunnel add tunY mode gre remote 104.171.118.133 local 192.168.0.13 ttl 225 #ifconfig tunY 104.171.118.134 # 10.0.201.0/24 still needs to be added. #ifconfig tunY up #ifconfig tunY pointopoint 10.0.201.1 # Why? #ifconfig tunY multicast #route add -net 10.0.201.0/24 dev tunY # This should probably be set in openvpn.conf # This clears the second ip addr IP set from the system! Don't use it! ## ifconfig tun0 92.222.41.125 up route add -host 192.168.231.1 tun0 echo "Setting up the tunnel default route and tunnel server path route" route add -host 176.31.174.122 gateway 192.168.0.6 dev eth2 route del -net default # Adding this since it will help in the future. # This is the address of the other side of the tunnel. # 192.168.231.x is set by openvpn's config route add -net default gateway 192.168.231.1 dev tun0 # tc qdisc add dev tunY root tbf rate 220kbit latency 50ms burst 1540 # 220kbit = 65GB/month. 50ms burst slows down TCP too much. # tc qdisc add dev tunY root tbf rate 440kbit latency 85ms burst 1540 # Apparently burst needs to be higher else packets can drop when loaded # tunY no longer exists. OpenVPN is used now. ## echo "Adding tunY qdisc" ## tc qdisc add dev tun0 root tbf rate 880kbit latency 100ms burst 3080 echo "Adding eth2 qdisc" # because of IPv6 DoS use # tc qdisc add dev eth2 root tbf rate 1320kbit latency 60ms burst 3080 tc qdisc add dev eth2 root tbf rate 5000kbit latency 60ms burst 3080