https://github.com/thenets/rinted-container
A containerized of rinetd. A user-mode TCP port redirection server.
https://github.com/thenets/rinted-container
docker kubernetes podman proxy rinet tcp
Last synced: 5 months ago
JSON representation
A containerized of rinetd. A user-mode TCP port redirection server.
- Host: GitHub
- URL: https://github.com/thenets/rinted-container
- Owner: thenets
- License: gpl-2.0
- Created: 2023-10-28T03:02:19.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-08T00:15:28.000Z (9 months ago)
- Last Synced: 2025-10-08T23:35:18.490Z (8 months ago)
- Topics: docker, kubernetes, podman, proxy, rinet, tcp
- Language: C
- Homepage:
- Size: 293 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: COPYING
Awesome Lists containing this project
README
[](https://github.com/thenets/rinted-container/actions/workflows/container-release-auto-patch.yml)
# rinetd: Containerized
A user-mode TCP port redirection server. Made by Thomas Boutell and Sam Hocevar.
---
Container images:
- [Quay.io](https://quay.io/repository/thenets/rinetd)
- `quay.io/thenets/rinetd:latest`
## How to use
You must have Podman or Docker installed in your system. I recommend Podman for security reasons; learn more:
- My blog post: [How to securely share secrets with podman containers](https://blog.thenets.org/how-to-securely-share-secrets-with-podman-containers/)
- Red Hat's docs: [What is Podman? Podman vs. Docker](https://www.redhat.com/en/topics/containers/what-is-podman#podman-vs-docker)
You can expose the ports to the host or use the `--net=host` option to use the host network stack.
```bash
# Rule format:
#
# Example:
# host 8080 -> container 80
# host 8443 -> container 443
# Method 1: Using the port redirect
podman run -it --rm \
--name rinetd \
-p 8080:80 \
-p 8443:443 \
-e RULE_blog_http="0.0.0.0 80 1.2.3.4 80" \
-e RULE_blog_https="0.0.0.0 443 1.2.3.4 443" \
quay.io/thenets/rinetd:latest
# Method 2: Using the host network stack
podman run -it --rm \
--name rinetd \
--net=host \
-e RULE_blog_http="0.0.0.0 8080 1.2.3.4 80" \
-e RULE_blog_https="0.0.0.0 8443 1.2.3.4 443" \
quay.io/thenets/rinetd:latest
```
### Output example

## Why this project exists?
The rinetd project is my preferred way to redirect TCP ports. It is simple, easy to use, and it is reliable. However, recent Linux distributions have removed the package from their repositories, and it behaves as an old project, requiring dynamic libraries and a single configuration file.
This repository contains a different approach, putting the rinetd inside Linux containers, with periodic builds for security patches and a simple way to configure the rules using environment variables.
## Credits
rinetd, by Thomas Boutell and Sam Hocevar. Released under the terms
of the GNU General Public License, version 2 or later.
This program is used to efficiently redirect connections from one IP
address/port combination to another. It is useful when operating virtual
servers, firewalls and the like.
To build under Unix, run `./bootstrap` to create the configuration
files, then `./configure` to create the build files, and then type
`make` to build rinetd. To install, type `make install` as root.
For documentation run `make install`, then type `man rinetd` for
details. Or, read `index.html` in your browser.