redirect linux server port

saat kemarin mencoba kalite, kalite secara default menggunakan port 8008, dan saya belum menemukan caranya untuk ganti ke port 80, artikel ini memberikan pencerahan

port 8008

$ nano /etc/network/if-pre-up.d/iptables

#!/bin/sh
#Redirect all traffic from port 80 to port 8008
# (khan port)
iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-port 8008

chown root:root /etc/network/if-pre-up.d/iptables
chmod +x /etc/network/if-pre-up.d/iptables
reboot
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s