tkom_peer.tmpl 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # Configuration file for PPP, using PPP over Ethernet
  2. # to connect to a DSL provider.
  3. #
  4. # See the manual page pppd(8) for information on all the options.
  5. ##
  6. # Section 1
  7. #
  8. # Stuff to configure...
  9. # MUST CHANGE: Uncomment the following line, replacing the user@provider.net
  10. # by the DSL user name given to your by your DSL provider.
  11. # (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
  12. {%- set user = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':pppoe:user', 'WRONG USER') %}
  13. user "{{ user }}"
  14. # Use the pppoe program to send the ppp packets over the Ethernet link
  15. # This line should work fine if this computer is the only one accessing
  16. # the Internet through this DSL connection. This is the right line to use
  17. # for most people.
  18. {%- set default_iface = 'eth2' %}
  19. {%- if salt['grains.get']('oscodename') == 'stretch' %}
  20. {%- set default_iface = 'enp3s0' %}
  21. {%- endif %}
  22. {%- set iface = salt['pillar.get']('nodes:' ~ grains['id'] ~ ':pppoe:iface', default_iface) %}
  23. pty "/usr/sbin/pppoe -I {{ iface }} -T 80 -m 1452"
  24. # An even more conservative version of the previous line, if things
  25. # don't work using -m 1452...
  26. #pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1412"
  27. # If the computer connected to the Internet using pppoe is not being used
  28. # by other computers as a gateway to the Internet, you can try the following
  29. # line instead, for a small gain in speed:
  30. #pty "/usr/sbin/pppoe -I eth0 -T 80"
  31. # The following two options should work fine for most DSL users.
  32. # Assumes that your IP address is allocated dynamically
  33. # by your DSL provider...
  34. noipdefault
  35. # Try to get the name server addresses from the ISP.
  36. #usepeerdns
  37. # Use this connection as the default route.
  38. # Comment out if you already have the correct default route installed.
  39. #defaultroute
  40. ##
  41. # Section 2
  42. #
  43. # Uncomment if your DSL provider charges by minute connected
  44. # and you want to use demand-dialing.
  45. #
  46. # Disconnect after 300 seconds (5 minutes) of idle time.
  47. #demand
  48. #idle 300
  49. ##
  50. # Section 3
  51. #
  52. # You shouldn't need to change these options...
  53. hide-password
  54. lcp-echo-interval 20
  55. lcp-echo-failure 3
  56. # Override any connect script that may have been set in /etc/ppp/options.
  57. connect /bin/true
  58. noauth
  59. persist
  60. mtu 1492
  61. # RFC 2516, paragraph 7 mandates that the following options MUST NOT be
  62. # requested and MUST be rejected if requested by the peer:
  63. # Address-and-Control-Field-Compression (ACFC)
  64. noaccomp
  65. # Asynchronous-Control-Character-Map (ACCM)
  66. default-asyncmap