Script to enable S3 traffic redirection

Content Platform for Cloud Scale Administration Guide

Version
2.6.x
File Size
1945 KB
Audience
anonymous
Part Number
MK-HCPCS008-10

A script is included to enable redirection of S3 traffic from port 443 to port 8443.

The script is written in Python and located in the folder install_path/product/bin (for example, /opt/hcpcs/bin).

The script redirects S3 traffic from port 443 to port 8443 using the file iptables.

Syntax

enable_s3_redirect.py

Options and parameters

None

Example

$ enable_s3_redirect.py

This example can produce the following output:

*** PREROUTING chain in NAT table before adding Redirect
Chain PREROUTING (policy ACCEPT 135 packets, 8100 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1      14M  845M DOCKER     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL

-------------------------------------------------------------------------
*** PREROUTING chain in NAT table after adding Redirect
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
num   pkts bytes target     prot opt in     out     source               destination         
1      14M  845M DOCKER     all  --  *      *       0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
2        0     0 REDIRECT   tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:443 redir ports 8443