Last active
September 1, 2018 16:58
-
-
Save ktechmidas/df1624fb2013e6c6fbcc4ca4b4464f4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iptables -t nat -A PREROUTING -p tcp -i ens5 --dport 80 -j DNAT --to-destination 10.116.23.86:80 | |
---------------------------------------------------------------------------------------------------- | |
- name: redirect http to web | |
iptables: | |
table: nat | |
chain: PREROUTING | |
in_interface: ens5 | |
protocol: tcp | |
match: tcp | |
destination: 10.116.23.86 | |
destination_port: 80 | |
jump: REDIRECT | |
to_ports: 80 | |
comment: Redirect web traffic to web server - http | |
--------------------------------------------------------------------------------------------------- | |
target prot opt source destination | |
DNAT tcp -- anywhere anywhere tcp dpt:http to:10.116.23.86:80 | |
REDIRECT tcp -- anywhere ip-10-116-23-86.ap-northeast-2.compute.internal tcp dpt:http /* Redirect web traffic to web server - http */ redir ports 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment