Created
January 1, 2014 15:59
-
-
Save LordAmit/8209072 to your computer and use it in GitHub Desktop.
Urban terror server port forwarding
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
#!/bin/bash | |
#<- this is a comment. | |
newport=2222 | |
forwardport=27960 | |
sudo iptables -t nat -A PREROUTING -p udp --dport $newport -j REDIRECT --to-ports $forwardport | |
#To check whether this rule works, type this command | |
#sudo iptables -nL -v --line-numbers -t nat | |
#if you want to disable it, simply type this command | |
#sudo iptables -t nat -D PREROUTING -p udp --dport $newport -j REDIRECT --to-ports $forwardport | |
#Written by Zed, modified and maintained by LordAmit of UrTBD Clan. | |
#Correction, iptable checking commannd provided by Bunny of Valhalla Clan. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment