Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. { ... }:
  2.  
  3. {
  4. networking = {
  5. nat = {
  6. enable = true;
  7. externalInterface = "enp3s0";
  8. externalIP = "192.168.2.11";
  9. forwardPorts = [
  10. { sourcePort = 25565; destination = "192.168.3.3"; }
  11. ];
  12. internalIPs = [ "192.168.3.3/32" ];
  13. };
  14. };
  15. containers.mc1 = {
  16. autoStart = true;
  17. privateNetwork = true;
  18. hostAddress = "192.168.3.2";
  19. localAddress = "192.168.3.3";
  20. config = { config, pkgs, ... }: {
  21. environment.systemPackages = with pkgs; [
  22. jdk8 screen
  23. ];
  24. networking = {
  25. firewall.allowedTCPPorts = [ 25565 ];
  26. hostName = "mc1.earthtools.ca";
  27. };
  28. users.extraUsers.mc1 = {
  29. isNormalUser = true;
  30. uid = 1020;
  31. };
  32. services = {
  33. openssh = {
  34. enable = true;
  35. permitRootLogin = "yes";
  36. };
  37. };
  38. };
  39. };
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement