bypassing NAT and PORT forwarding using wireguard poll

Sorry if this is spamming as i created a thread about wireguard a few days ago

Just wanted to know if it can be useful for some/any people as creating a script would be a waste if no one has much use for it.

IT'S FOR PEOPLE FOR WHOM PORT FORWARDING DOSEN'T WORK PROPERLY USING SOMETHING LIKE ZEROTIER or would like a specific feature not available in zerotier

If anyone is intrested I would create a script to to all the work for you on a linux (debian) server,

Things required -
A VPS/server of your choice, Local device on which you will install wireguard client to reroute the traffic
Here is how it would work

1)Running the the script will ask you which port/s you would like to forward and it's protocol (TCP/UDP/Both)
2)It will then install and configure wireguard and firewall and create client config file then encrypt the file on the server using 16/32 random letters into a zip and upload it to a temp. file hosting service or create a QR code which can be scanned using official wireguard app
3)Install wireguard on the the device (or a capable router/openwrt etc.) you would like to port forward and import the generated/downloaded conf file
4)You should be able to acces the forwaded ports on IP-address-of-server:port

Optional
You can also set Policy Routing on your local device(if supported) so only the traffic of forwaded ports will be forwaded to the VPS/server and rest all traffic will flow normally
 
Last edited by a moderator:
What I meant to say that I can only guarantee that it will properly with ubuntu 20.04.

It should work with other debian based distribution as well but It will take quite a bit of time to verify that.
 
Slight OT: if anyone is using this with AWS be careful the pricing for their bandwidth consumption is really weird when using EC2. You will end up paying /GB for the download your client will do (as EC2 will be egressing that amount).
 
@royalroy Sorry for seeing this late brother, I was not active here for a long, No it worked fine with the debit card, then I just entered my Github Promotional Code.
Alternatively, you can use PayPal too, but it takes $5 I think
 
@Rehan Kumar was looking for exactly this. need port forwarding for a private tracker as my current isp (netplus) uses CGNAT and no ipv6. is it possible to host this on cloudflare workers (netlify or heroku ??)since people do host their gdrive index's on their (this might just be my imagination 🙂. will appreciate if you look into it? ping me if you need any info


edit: using colab as vps

, Google Colaboratory caveat: "maximum lifetime of a VM is 12 hours. Idle VMs time out after 90m'

edit2:Google Colaboratory
 
Last edited by a moderator:
Hi @Rehan Kumar , I tried running the above script on server, but I am not able to access the internet via VPN. I even opened ports on vps(51820) for wireguard. Is this setup only for incoming connections? Pls help
 
Sorry for the delay, it's an old script with few problems
I initially planned on uploading a fixed script but I stopped doing much linux soon afterwards so didn't paid much attention
I should have the fixed script saved somewhere, will update along with one for RHEL based distros (fedora, oracle linux etc.)
 

Top