Advertisement
finders2014

rasp-pi-wg

Dec 7th, 2024
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.11 KB | None | 0 0
  1. kunal@raspberrypi:~ $ sudo cat /etc/wireguard/wg0.conf
  2. [Interface]
  3. Address = 10.18.6.5/32
  4. MTU = 1380
  5. PostUp = wg set %i private-key /etc/wireguard/%i.key
  6. DNS = 1.1.1.1
  7.  
  8. [Peer]
  9. PublicKey = aws-pub-key
  10. PresharedKey = pre-sharedkey
  11. PersistentKeepalive = 25
  12. Endpoint = aws_wg:51820
  13. AllowedIPs = 10.18.6.0/24
  14.  
  15. kunal@raspberrypi:~ $ sudo wg show
  16. interface: wg0
  17. public key: Ras-pi-pub-key
  18. private key: (hidden)
  19. listening port: 50080
  20.  
  21. peer: aws-pub-key
  22. preshared key: (hidden)
  23. endpoint: aws_wg:51820
  24. allowed ips: 10.18.6.0/24
  25. latest handshake: 1 minute, 42 seconds ago
  26. transfer: 52.37 KiB received, 61.93 KiB sent
  27. persistent keepalive: every 25 seconds
  28.  
  29. kunal@raspberrypi:~ $ route
  30. Kernel IP routing table
  31. Destination Gateway Genmask Flags Metric Ref Use Iface
  32. default 192.168.0.1 0.0.0.0 UG 100 0 0 eth0
  33. 10.18.6.0 0.0.0.0 255.255.255.0 U 0 0 0 wg0
  34. 192.168.0.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
  35.  
  36. kunal@raspberrypi:~ $ ip addr
  37. 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
  38. link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  39. inet 127.0.0.1/8 scope host lo
  40. valid_lft forever preferred_lft forever
  41. inet6 ::1/128 scope host noprefixroute
  42. valid_lft forever preferred_lft forever
  43. 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
  44. link/ether b8:27:eb:47:1e:13 brd ff:ff:ff:ff:ff:ff
  45. inet 192.168.0.38/24 brd 192.168.0.255 scope global noprefixroute eth0
  46. valid_lft forever preferred_lft forever
  47. inet6 fd5b:a219:37df:9e4c:f3c7:80b9:83de:93cc/64 scope global dynamic noprefixroute
  48. valid_lft 1772sec preferred_lft 1772sec
  49. inet6 fe80::56db:73dd:8021:f93b/64 scope link noprefixroute
  50. valid_lft forever preferred_lft forever
  51. 3: wg0: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1380 qdisc noqueue state UNKNOWN group default qlen 1000
  52. link/none
  53. inet 10.18.6.5/32 scope global wg0
  54. valid_lft forever preferred_lft forever
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement