forked from c3d2/nix-config
udpate
This commit is contained in:
parent
73d3076573
commit
b408bcc2bd
|
@ -58,7 +58,7 @@
|
|||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget vim python3Full nmap htop wireguard-tools
|
||||
wget vim python3Full python310Packages.pip nmap htop wireguard-tools
|
||||
];
|
||||
|
||||
|
||||
|
@ -76,17 +76,6 @@
|
|||
allowedUDPPorts = [ 5000 22 53 80 8080 18900 19900 ];
|
||||
};
|
||||
|
||||
|
||||
#-------------------------------VPN---------------------------------
|
||||
|
||||
# enable NAT
|
||||
# networking.nat.enable = true;
|
||||
# networking.nat.externalInterface = "eth0";
|
||||
# networking.nat.internalInterfaces = [ "wg0" ];
|
||||
# networking.firewall = {
|
||||
# allowedUDPPorts = [ 51820 ];
|
||||
# };
|
||||
|
||||
#_______________________________Begin-VPN1-Server____________________________________
|
||||
|
||||
networking.wireguard.interfaces = {
|
||||
|
@ -94,12 +83,9 @@
|
|||
vpn1 = {
|
||||
#IP address && Subnet.
|
||||
ips = [ "10.10.11.1/24" ];
|
||||
|
||||
#VPN Port.
|
||||
listenPort = 18900;
|
||||
|
||||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||
privateKeyFile = "/etc/wireguard/privatekey";
|
||||
#----------------------Start-Routing----------------------------
|
||||
postSetup = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.10.11.1/24 -o flpk -j MASQUERADE
|
||||
|
@ -111,13 +97,6 @@
|
|||
'';
|
||||
#----------------------End-Routing----------------------------
|
||||
|
||||
# Path to the private key file.
|
||||
#
|
||||
# Note: The private key can also be included inline via the privateKey option,
|
||||
# but this makes the private key world-readable; thus, using privateKeyFile is
|
||||
# recommended.
|
||||
privateKeyFile = "/etc/wireguard/privatekey";
|
||||
|
||||
peers = [
|
||||
# ------------------leon-------------------------.
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user