-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Manas Gupta edited this page Jun 26, 2021
·
2 revisions
An iptables based port forwarding API server. Wiki contains details of the API contracts.
Example: curl -X GET http://<Forwardingserver_IP>/connections -H 'Authorization: Token <token here>'
Deletion of connection is scheduled as per the expiry period passed during creation of the connection. This expiry period is overwritten with new expiry_period in case of renewal
-
"id": 1
Unique identification number of a connection -
"rule_protocol": "tcp"
Protocol of rule that gets created in NAT table -
"active": false
State of the connection whether it is active or not -
"created_at": "2021-06-26T00:09:48.376071+05:30"
Timestamp of creation of connection -
"updated_at": "2021-06-26T00:10:09.119828+05:30"
Timestamp of updation of connection -
"renewal_count": 0
Count of number of times this connection has been renewed -
"source_ip": "8.8.8.8"
Source IP or Client IP. -
"forwarder_port": "23986"
Forwarder port is the port allotted to this connection and client makes requests to forwarder_service:forwarder_port -
"destination_ip": "10.16.17.18"
This is the IP of destination, the end server where client's packets are to be forwarded -
"destination_port": "7800"
This is the port of destination, the end server where client's packets are to be forwarded -
"expiry_period": "00:10:00"
Expiry period of the connection, defaults to 4 hours. xx:yy:zz refers to xx hours, yy minutes and zz seconds See Duration Field for more details on format of the value corresponding to this attribute
- Response returned as
401 Unauthenticated Access
if authentication mechanism used in request does not pass. - Response returned as
405 Method Not Allowed
if HTTP method other than those mentioned in Wiki are used in Request. - Response returned as
500 Internal Server Error
if server encounters an error while processing the request.