wireguard's Introduction
wireguard's People
Forkers
houzhongshe w796933 remeng cbrown539 augustusgao yzy418 love0o0 muyulnk sallenkey-wei sb1069394 iwocom yunyun1414 ygybjc wqx7860 beversmith qianxunyuyun hongjoy chvais qiangzai0930 mischief1 yhdnf alsoshout ggsjj xuguang1007 johnnicolly eg1688 hf97542 fangfang1028 vip34 minnow54426 hublinux wwtfly huchangli sk1340 carl-xiao128 giegloop w7yuu alanng2017 xcode-maker nemochina2008 rainly zhoufeng5777 cfcboy product-think2049 wtkim2027 w2816771 iedudfed duanhjlt kangvcar jamerhe iconing wang12xishan xven jovialsidney pingyuan162 tommy151 roceys lelevenl luckypoem jesuslab amiriliao lxing1988 heart1016 dyd4765 dwnews-tangcongzhen fengling123 zwg1026 zhugelail1998 wutenglan thankeyes michael-he1980 wpyok500 donald2018 gocpp gongbing2018-google ydwg moecao ccav6123 whcamera gn01 rxei luqiaobing123 u200915986 gotocky pprice2018 huangkun318 315889887 wencaisn junbaor ghmzmq zhowl miroda antsniffer presleyhank sausame clone666666 alanwangbit shuigs shuichilanglang eversmilywireguard's Issues
为什么PostUp中要配置iptables FORWARD表把10.77.77.1/24 到10.77.77.1/24的包丢掉呀
wireguard/wireguard_install.sh
Line 111 in ea82cc6
代码片段在这,问题同上
wireguard_game_ubuntu.sh两处报错
vps 1 buyvm 双网卡,eth0 和eth1,eth1默认未启用。
输入你客户端电脑的默认网关,打开cmd,使用ipconfig命令查看
比如192.168.1.1 :10.98.22.254
Warning: /etc/wireguard/wg0.conf' is world accessible [#] ip link add wg0 type wireguard [#] wg setconf wg0 /dev/fd/63 Line unrecognized:
eth1-jMASQUERADE'
Configuration parsing error
[#] ip link delete dev wg0
vps 2 cloudcone
输入你客户端电脑的默认网关,打开cmd,使用ipconfig命令查看
比如192.168.1.1 :10.98.22.254
Warning: `/etc/wireguard/wg0.conf' is world accessible
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip address add 10.0.0.1/24 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] resolvconf -a tun.wg0 -m 0 -x
Too few arguments.
Too few arguments.
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
连上了vpn server,但是访问显示IP的网站,为什么显示的还是我的isp分配给我的ip而非vps的IP?
hello.
客户端配置文件内容:
[Interface]
PrivateKey = hidden
Address = 10.0.0.2/24
DNS = 8.8.8.8
MTU = 1420
[Peer]
PublicKey = hidden
Endpoint = my-vps-ip:21039
AllowedIPs = 0.0.0.0/0, ::0/0
PersistentKeepalive = 25
服务器端配置文件内容:
[Interface]
PrivateKey = hidden
Address = 10.0.0.1/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 21039
DNS = 8.8.8.8
MTU = 1420
[Peer]
PublicKey = hidden
AllowedIPs = 10.0.0.2/32
然后我在mac上运行:
sudo ./tunsafe start ~/wg-client-from-bwg-kvm-vps.conf
Password:
Loading file: /Users/brite/wg-client-from-bwg-kvm-vps.conf
Run: /sbin/ifconfig utun1 10.0.0.2 mtu 1420 10.0.0.2 netmask 255.255.255.0 up
Run: /sbin/route -q add 10.0.0.0/24 10.0.0.2
add net 10.0.0.0: gateway 10.0.0.2
Run: /sbin/route -q add my-vps-ip/32 10.0.0.1
add net my-vps-ip: gateway 10.0.0.1
Run: /sbin/route -q add 0.0.0.0/1 10.0.0.1
add net 0.0.0.0: gateway 10.0.0.1
Run: /sbin/route -q add 128.0.0.0/1 10.0.0.1
add net 128.0.0.0: gateway 10.0.0.1
Sending handshake...
Connection established. IP 10.0.0.2
但是我访问显示IP的网站,显示的还是我的isp分配给我的ip而非vps的IP。
为什么?如何解决?谢谢你.
客户端程序,我用的是https://github.com/TunSafe/TunSafe ,
config_wg() function have a problem in wg_mult.sh
In line no. 164, the command for define variable eth have and odd value, if user have already use docker service.
The return value of "ls /sys/class/net" of docker user is like this. "docker0 eXX# lo".
The first record is virtual device name for docker service, so the command "awk 'NR==1&&/^e/{print $1}'" return "".
微软云使用一键脚本没网
似乎现在不支持多个设备同时使用阿,速度会很慢
大佬好,莫非你第二个脚本是解决这个问题的吗?
最新脚本有错误
./wireguard_install.sh: line 7: syntax error near unexpected token newline' ./wireguard_install.sh: line 7:
'
我发现一个WG搭配$$一起使用的方法,这样子就可以解决路由的问题
假设:你服务端上的$$监听端口是23333
你服务端wg的Interface地址是:10.0.0.1/24
你客户端wg的Interface地址是:10.0.0.2/24,修改一下你的conf文件里的AllowedIPs地址为:10.0.0.1/24
那么就可以在$$的客户端的连接地址上写:10.0.0.1,剩下的什么端口都是填写$$的端口和密码
老哥你好
请问怎么让单账号支持多用户啊,现在多人连接其中一个会没网
关于WireGuard一键安装脚本端口
亲爱的yobabyshark,您好!
您编写并共享的一键搭建WireGuard服务器的代码:https://raw.githubusercontent.com/yobabyshark/wireguard/master/wireguard_install.sh 确实很好!很多人都是由于您的这个shell脚本代码安装成功了WireGuard服务器。我看到您的代码里面对于端口定义是随机的从10000到60000,这个如果只是在境外VPS上搭建WireGuard做翻墙,那确实是很好的,端口随机也很安全。
但,WireGuard不仅仅是用来翻墙,它还是个VPN,如果做VPN服务器端的话,还是希望自定义端口的。因为国内环境都是宽带接进来,运营商只给路由器一个公网IP(当然好多都没有公网IP,必须要穿透内网),然后内网Linux服务器上搭建WireGuard,在路由器上映射端口,以便在外的时候,方便用VPN连接公司内网,使用公司内网的共享资源等。
此脚本,希望加上两行iptables防火墙转发代码,否则如果做VPN的话不正常,无法转发局域网服务器的流量数据。
增加脚本建议如下:
第一行找到WAN口IP:
WANIP=$(ip addr | grep 'inet' | grep -v inet6 | grep -vE '127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -1)
第二行添加iptables转发
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -j SNAT --to-source $WANIP
非常的感谢您!
PS,我看到您这里也有一键部署OpenVPN的shell,但好像只能够用默认的1194端口,不能自定义。现在就算运营商良心发现给公网IP,但都会严格的封闭死80、443、1194、1701、1723、8080等这些端口的。所以对于我这样的小白,希望是在用shell脚本部署的时候,就让我自定义好端口,然后稍后做端口映射即可。或者有时候都是端口映射都已经做好了,只能够用指定端口做服务。这样自定义端口就方便很多。
wireguard not running
I am using ubuntu 18.04 with XEN type, for wireguard usually using PPA and it works perfectly.
Dec 19 21:40:22 xxx systemd[1]: Starting WireGuard via wg-quick(8) for wg0...
Dec 19 21:40:22 xxx wg-quick[601]: Warning: `/etc/wireguard/wg0.conf' is world accessible
Dec 19 21:40:22 xxx wg-quick[601]: [#] ip link add wg0 type wireguard
Dec 19 21:40:22 xxx wg-quick[601]: RTNETLINK answers: Operation not supported
Dec 19 21:40:22 xxx wg-quick[601]: Unable to access interface: Protocol not supported
Dec 19 21:40:22 xxx wg-quick[601]: [#] ip link delete dev wg0
Dec 19 21:40:22 xxx systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Dec 19 21:40:22 xxx wg-quick[601]: Cannot find device "wg0"
Dec 19 21:40:22 xxx systemd[1]: [email protected]: Failed with result 'exit-code'.
Dec 19 21:40:22 xxx systemd[1]: Failed to start WireGuard via wg-quick(8) for wg0.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.