Unverified Commit 4b47e084 authored by ijaz ahmad's avatar ijaz ahmad Committed by GitHub
Browse files

Create port-forwarding-iptables

parent 4557cc15
sudo yum install iptables-services
sudo systemctl mask firewalld.service
sudo systemctl enable iptables.service
# Optional:
# systemctl enable ip6tables.service
# Optional: youmay have 80 -> 8080 redirects. if so, -D (delete) them first:
sudo /sbin/iptables -t nat -D OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo /sbin/iptables -t nat -D PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo /sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8180
sudo /sbin/iptables -t nat -I OUTPUT -o lo -p tcp --dport 80 -j REDIRECT --to-port 8180
sudo service iptables save
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment