Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pzmarzly/portforwarder-rs
Forwards ports on UPnP-enabled gateways. Inspired by portmapper.
https://github.com/pzmarzly/portforwarder-rs
hacktoberfest port-forwarding port-mapper redirects-ports router rust upnp-enabled-gateways upnp-portmapper
Last synced: about 1 month ago
JSON representation
Forwards ports on UPnP-enabled gateways. Inspired by portmapper.
- Host: GitHub
- URL: https://github.com/pzmarzly/portforwarder-rs
- Owner: pzmarzly
- License: mit
- Created: 2018-02-17T18:11:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-23T08:26:51.000Z (5 months ago)
- Last Synced: 2024-11-07T09:08:30.094Z (about 2 months ago)
- Topics: hacktoberfest, port-forwarding, port-mapper, redirects-ports, router, rust, upnp-enabled-gateways, upnp-portmapper
- Language: Rust
- Homepage: https://crates.io/crates/portforwarder-rs
- Size: 16.6 KB
- Stars: 12
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Port forwarder
Connects to UPnP-enabled gateways and redirects ports. Inspired by [portmapper](https://github.com/kaklakariada/portmapper) (written in Java). Abstraction over [`igd` crate](https://crates.io/crates/igd). Tested on Zhone Access Point with 2014 firmware (it cannot list opened ports, so I did not try to implement such feature).
This crate consists of binary `pf` and simple library abstracting over port forwarding and network interface listing.
This crate __HAS NOT BEEN TESTED ON WINDOWS OR MACOS.__
## Building
Install the utility using command:
cargo install portforwarder-rs
or build from source with:
git clone https://github.com/pzmarzly/portforwarder-rs
cd portforwarder-rs
cargo build --release
mv target/release/pf## Usage
Redirect ports on first-matched device:
pf any TCP/80/80 UDP/3000/2000 TCP/81/82
Format is `{TCP|UDP}/LOCAL_PORT/REMOTE_PORT`.
Redirect ports on a network interface with specific IPv4 address:
pf 192.168.254.107 TCP/8080/8080