Re: Gateway VPN - Rsperry Pi Router

This paste is a reply to Gateway VPN - Rsperry Pi Router from Chunky Panda - view diff
By: Silly Parakeet | 10 Months | Syntax: Plain Text | Views: 147
URL http://paste.itunix.eu/view/cb841fe2

  1. Gateway VPN - Rsperry Pi Router
  2.  
  3. # nano /etc/sysctl.conf
  4. # net.ipv4.ip_forward=1
  5. # sysctl -p
  6.  
  7. # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  8. # iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE
  9.  
  10. Enable VPN at boot
  11. # systemctl enable openvpn@Japan
  12.  
  13.  
  14. nano /etc/default/openvpn
  15. #AUTOSTART="Japan"
  16.  
  17. ##################################################
  18. cron: @reboot sh /etc/openvpn/startRouting.sh
  19.  
  20. cat /etc/openvpn/startRouting.sh
  21. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  22. iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE
  23.  
  24. cron:
  25. 0 0 * * * vnstati -i eth0 -o /var/www/bandwidth/current_s.png -s; vnstati -i eth0 -o /var/www/bandwidth/current_h.png -h; vnstati -i eth0 -o /var/www/bandwidth/current_d.png -d; vnstati -i eth0 -o /var/www/bandwidth/current_t.png -t; vnstati -i eth0 -o /var/www/bandwidth/current_m.png -m;
  26.  
  27. 0 0 * * * vnstati -i tap0 -o /var/www/bandwidth/current_vpn_s.png -s; vnstati -i tap0 -o /var/www/bandwidth/current_vpn_h.png -h; vnstati -i tap0 -o /var/www/bandwidth/current_vpn_d.png -d; vnstati -i tap0 -o /var/www/bandwidth/current_vpn_t.png -t; vnstati -i tap0 -o /var/www/bandwidth/current_vpn_m.png -m;

Reply to "Re: Gateway VPN - Rsperry Pi Router"

Here you can reply to the paste above