September 2018
Intermediate to advanced
764 pages
20h 6m
English
Another solution is to use iptables, which is the same firewall we used before. Apart from blocking out traffic from certain ports, iptables also allows you to redirect traffic from one port to another. Therefore, we can simply route all traffic entering port 80 to port 8080:
hobnob@hobnob:$ sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
Read now
Unlock full access