This file contains hidden or 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
| #First Allow forwarding of port 80 to create a connection | |
| sudo iptables -A FORWARD -i eth0 -o eth1 -p tcp --syn --dport 80 -m conntrack --ctstate NEW -j ACCEPT | |
| #Second allow movement of traffic for established connections back and forth | |
| iptables -A FORWARD -i eth0 -o eth1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
| iptables -A FORWARD -i eth1 -o eth0 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
| #Forward traffic comming on port 80 from eth0 to private server | |
| sudo iptables -A PREROUTING -t nat -i eth0 -p tcp -d 192.168.1.1 --dport 80 -j DNAT --to-destination 192.0.2.2:80 |
This file contains hidden or 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
| listen https | |
| bind 0.0.0.0:443 | |
| mode tcp | |
| timeout connect 4000 | |
| timeout client 180000 | |
| timeout server 180000 | |
| server s1 host.example.com:443 |
This file contains hidden or 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
| #!/bin/bash | |
| apt-get update | |
| apt-get upgrade -y | |
| # Set the TimeZone | |
| timedatectl | |
| timedatectl set-timezone Asia/Dubai | |
| timedatectl | |
| # Set the Hostname of the Machine |