Giter Site home page Giter Site logo

Comments (3)

KaeTuuN avatar KaeTuuN commented on June 3, 2024

What Port do you want to change? The Wireguard Port on the Server? This is a really bad idea, because you need to touch every config on every client you already use.

If you really need to do that, you have to replace this port manually in your server config, script, firewall rules and all client configs on all clients. This can't be done via this script.

from wireguard-install.

DanielKOcean avatar DanielKOcean commented on June 3, 2024

What Port do you want to change? The Wireguard Port on the Server? This is a really bad idea, because you need to touch every config on every client you already use.

If you really need to do that, you have to replace this port manually in your server config, script, firewall rules and all client configs on all clients. This can't be done via this script.

I understand what you are talking about. But I use WireGuard server as a personal one, so have 2 devices connected. Changing port number on them is not a problem. The problem is that I live in a country, where government blocks server port after a day or two when see that this port is used for VPN traffic. The solution is to run command on server and change two configs on devices, than to reinstall wire guard with the new port, recreate users and transfer configs to devices.

from wireguard-install.

Nyr avatar Nyr commented on June 3, 2024

While this will not be implemented into the script, I understand your use case. In the server, you can redirect ports like this, assuming you are using Debian and no firewall:
iptables -t nat -A PREROUTING -p udp -d $IP --dport $NEW_PORT -j REDIRECT --to-port $OLD_PORT

  • $IP is the IP of your server
  • $OLD_PORT is the port where WireGuard is listening originally
  • $NEW_PORT is the new port where you want WireGuard to be available

You can run this multiple times to set up multiple ports and even use a big range and change on demand from the client. That said, there are better tools than WireGuard to evade filtering, if the need arises.

from wireguard-install.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.