{"id":18841952,"url":"https://github.com/ahmetozer/dynamic-fou","last_synced_at":"2025-09-04T00:36:20.755Z","repository":{"id":65695879,"uuid":"415373526","full_name":"ahmetozer/dynamic-fou","owner":"ahmetozer","description":"Create a dynamic fou tunnels works behind NAT at Linux","archived":false,"fork":false,"pushed_at":"2021-11-04T21:04:19.000Z","size":81,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T21:12:35.098Z","etag":null,"topics":["golang","linux","linux-tunnel","network","network-tunnel","tunnel"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmetozer.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-09T17:14:14.000Z","updated_at":"2025-01-23T10:24:33.000Z","dependencies_parsed_at":"2023-02-05T00:46:35.371Z","dependency_job_id":null,"html_url":"https://github.com/ahmetozer/dynamic-fou","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fdynamic-fou","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fdynamic-fou/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fdynamic-fou/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmetozer%2Fdynamic-fou/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmetozer","download_url":"https://codeload.github.com/ahmetozer/dynamic-fou/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248839362,"owners_count":21169799,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","linux","linux-tunnel","network","network-tunnel","tunnel"],"created_at":"2024-11-08T02:53:08.593Z","updated_at":"2025-04-14T07:31:21.977Z","avatar_url":"https://github.com/ahmetozer.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic Linux Tunneling\n\nThis software creates Gretap Tunnels over FOU for Dynamic client endpoints.  \nIt also works behind NAT444 (CGN-LSN). You can use low end devices for connecting two sites with a lightweight network tunnel mechanism that is supported by the Linux kernel.\n\nBefore starting using this software, please be sure your kernel supports FOU encap.  \nIf your kernel has a FOU support but not enabled, you can enable it with `modprobe fou` command.\n\n## Server Side\n\nSystem is requires 2 ports for testing, identifying and network traffic.\nFirst default port 65200 UDP is used for detecting client IP and port pair for tunneling, 65200 TCP is used for when the tunnel interfaces are ready and up, TCP keepalive packets checks the tunnel health.\nSecond port used for handling incoming tunneling packets. By default FOU port is 65201.\n\n### Server configuration\n\nThe application is configured with environment variables.\n\n```bash\nLOG_LEVEL=2     # Debug level 1, Info level 2, Error level 3\nLOG_FILE=-      # Save output to file, default is - for stdout\nIP=[::]         # Listen address for first port\nPORT=65200      # Client test and identification. It listens to both TCP and UDP.\nFOU_PORT=65201  # Incoming tunneling packet destination.\nSCRIPT_FILE=    # Execute when the new client established\nCLIENT_LIST=    # Client configurations file\n```\n\nFor client verification and interface MTU configuration, client configuration for the server is stored in a json file.\n\n```json\n[\n    {\"ClientName\":\"client1\",\"clientKey\":\"KUnqdrF54YrHxDQK\", \"MTU\":1460}\n]\n```\n\nWith defining `SCRIPT_FILE` environment variable, when the new client connection is established, the system will execute a defined file with below environment variables.\n\n```bash\nMODE=server              # Current server mode\nCLIENT_NAME=client1      # Client name\nREMOTE_ADDR=203.0.113.56 # Client connection IP\nREMOTE_PORT=32284        # Client connection UDP port\nMTU=1448                 # MTU value that is defined Client list\nINTERFACE=dyn1           # Interface name for this client\nFOU_PORT=65201           # Local fou port for listening incoming packets\n```\n\nExample script is available at `/scripts/server.sh`.\n\n## Client Side\n\nTo automate configure tunnel endpoints at client side, you can execute this software as client mode. You can switch client mode with setting the first argument as client or set the environment variable `MODE=client` .\n\n### Client Configuration\n\nYou can again configure the application with below environment variables.\n\n```bash\nLOG_LEVEL=2   # Debug level 1, Info level 2, Error level 3\nLOG_FILE=-    # Save output to file, default is - for stdout\nSERVER_LIST   # Server list json file path\nSCRIPT_FILE   # Execute a file when the connection established\nMODE=client   #  Set program mode as client\n```\n\nServer list file contains client name and remote server infos such as IP and PORT and also each connection has a key for validating the client.\n\n```json\n{\n    \"ClientName\": \"client1\",\n    \"servers\": [\n        {\n            \"remoteAddr\": \"203.0.113.80\",\n            \"remotePort\": 65200,\n            \"clientKey\": \"client1keyForHas\",\n            \"MTU\": 1460\n        }\n    ]\n}\n```\n\nBelow arguments are passed to the script file when the system establishes the connection.\n\n```bash\nMODE=client                                     # Current application mode\nREMOTE_ADDR=203.0.113.80                        # Server IP address\nREMOTE_PORT=65200                               # Server Managment port\nMTU=1460                                        # Tunnel MTU\nREMOTE_LOCAL_IPV6=fe80::4c6:1dff:fea8:fd03/64   # Link Local IPv6 addr for remote server endpoint\nWHOAMI_IP=203.0.113.56                          # Client IP address detected by server\nWHOAMI_PORT=32068                               # Client Incoming port detected by server\nINTERFACE=dyn1                                  # Created interface for this connection\nFOU_PORT=48398                                  # Client Incoming port before nat. \nREMOTE_FOU_PORT=65201                           # Server Inbound Port\n```\n\nYou can find example script at `/scripts/client.sh`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Fdynamic-fou","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmetozer%2Fdynamic-fou","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmetozer%2Fdynamic-fou/lists"}