Giter Site home page Giter Site logo

wireguard-router's Introduction

Wireguard router project

Manages servers and users

Automatically creates config files and generates user configs

Automatically generates wireguard server and interface configuration

Starts/stops wireguard interfaces

Creates port forwarding rules

Install wiregard on debian

echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable
apt update
apt install wireguard
apt install libmnl-dev libelf-dev linux-headers-$(uname -r) build-essential pkg-config
modprobe wireguard

Install wireguard on Gentoo

##unmask package
echo "virtual/wireguard ~amd64" > /etc/portage/package.keywords/wireguard
echo "net-vpn/wireguard-modules ~amd64 " >> /etc/portage/package.keywords/wireguard
echo "net-vpn/wireguard-tools ~amd64 " >> /etc/portage/package.keywords/wireguard

##emerge
emerge resolvconf net-vpn/wireguard-tools net-vpn/wireguard-modules

##add modules to be loaded
echo 'modules="wireguard"' >> /etc/conf.d/modules
modprobe wireguard

Kernel rules for Gentoo

[*] Networking support > 
	Networking Options --->
	[*] TCP/IP Networking
	<M> IP: Foo (IP protocols) over UDP
		[*] Network packet filtering framework (Netfilter) --->
			[*] Advanced netfilter configuration
				Core Netfilter Configuration --->
					<M> Netfilter connection tracking support
					<*> Netfilter Xtables support
					<M> nfmark target and match support
					<M> "CONNMARK" target support
					<M> "comment" match support
					<M> "hashlimit" match support
				IP: Netfilter Configuration --->
					<M> raw table support (required for NOTRACK/TRACE)
[*] Cryptographic API --->
	[*] Cryptographic algorithm manager
	[M] Parallel crypro engine

OpenRC Start file

#!/sbin/openrc-run
depend() {
	need net
	want dns
}

start() {
	wg-quick up {interface_name}
}

stop() {
	wg-quick down {interface_name}
}

restart() {
	wg-quick down {interface_name}
	wg-quick up {interface_name}
}	

status() {
	wg show {interface_name}
}

name="Wireguard client"

TODO:

  • check connected peers
  • set interface autostart

wireguard-router's People

Contributors

desultory-zz avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

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.