Opening UDP Ports
I'm trying to open a port which I believe I did but maybe It didn't work.
I'm trying to run a server of Counter Strike 1.6 and its Online however Its not responding when I try to refresh data about the server. I also tried to check and It fails with quering the ports as you can see here:

I'm assuming that It has something with the ports, I opened them using this command:
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT
I then tried to run nmap to see what ports are actually opened but It didn't seem like they are open:

14.04 networking server
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 9 more comments
I'm trying to open a port which I believe I did but maybe It didn't work.
I'm trying to run a server of Counter Strike 1.6 and its Online however Its not responding when I try to refresh data about the server. I also tried to check and It fails with quering the ports as you can see here:

I'm assuming that It has something with the ports, I opened them using this command:
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT
I then tried to run nmap to see what ports are actually opened but It didn't seem like they are open:

14.04 networking server
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What NMAP command did you use?
– Robby1212
May 28 '17 at 12:23
NMAP ip_address
– Da black ninja
May 28 '17 at 12:23
What is the output ofnmap -p- ip_address?
– Robby1212
May 28 '17 at 12:25
@Robby1212 i.imgur.com/4rYmZrm.png
– Da black ninja
May 28 '17 at 12:27
Huh, well those ports definitely aren't open that much is for sure.
– Robby1212
May 28 '17 at 12:28
|
show 9 more comments
I'm trying to open a port which I believe I did but maybe It didn't work.
I'm trying to run a server of Counter Strike 1.6 and its Online however Its not responding when I try to refresh data about the server. I also tried to check and It fails with quering the ports as you can see here:

I'm assuming that It has something with the ports, I opened them using this command:
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT
I then tried to run nmap to see what ports are actually opened but It didn't seem like they are open:

14.04 networking server
I'm trying to open a port which I believe I did but maybe It didn't work.
I'm trying to run a server of Counter Strike 1.6 and its Online however Its not responding when I try to refresh data about the server. I also tried to check and It fails with quering the ports as you can see here:

I'm assuming that It has something with the ports, I opened them using this command:
iptables -A INPUT -p udp -m udp --sport 27000:27030 --dport 1025:65355 -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 4380 --dport 1025:65355 -j ACCEPT
I then tried to run nmap to see what ports are actually opened but It didn't seem like they are open:

14.04 networking server
14.04 networking server
edited May 28 '17 at 12:33
Android Dev
10.9k63362
10.9k63362
asked May 28 '17 at 12:18
Da black ninjaDa black ninja
111
111
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What NMAP command did you use?
– Robby1212
May 28 '17 at 12:23
NMAP ip_address
– Da black ninja
May 28 '17 at 12:23
What is the output ofnmap -p- ip_address?
– Robby1212
May 28 '17 at 12:25
@Robby1212 i.imgur.com/4rYmZrm.png
– Da black ninja
May 28 '17 at 12:27
Huh, well those ports definitely aren't open that much is for sure.
– Robby1212
May 28 '17 at 12:28
|
show 9 more comments
What NMAP command did you use?
– Robby1212
May 28 '17 at 12:23
NMAP ip_address
– Da black ninja
May 28 '17 at 12:23
What is the output ofnmap -p- ip_address?
– Robby1212
May 28 '17 at 12:25
@Robby1212 i.imgur.com/4rYmZrm.png
– Da black ninja
May 28 '17 at 12:27
Huh, well those ports definitely aren't open that much is for sure.
– Robby1212
May 28 '17 at 12:28
What NMAP command did you use?
– Robby1212
May 28 '17 at 12:23
What NMAP command did you use?
– Robby1212
May 28 '17 at 12:23
NMAP ip_address
– Da black ninja
May 28 '17 at 12:23
NMAP ip_address
– Da black ninja
May 28 '17 at 12:23
What is the output of
nmap -p- ip_address?– Robby1212
May 28 '17 at 12:25
What is the output of
nmap -p- ip_address?– Robby1212
May 28 '17 at 12:25
@Robby1212 i.imgur.com/4rYmZrm.png
– Da black ninja
May 28 '17 at 12:27
@Robby1212 i.imgur.com/4rYmZrm.png
– Da black ninja
May 28 '17 at 12:27
Huh, well those ports definitely aren't open that much is for sure.
– Robby1212
May 28 '17 at 12:28
Huh, well those ports definitely aren't open that much is for sure.
– Robby1212
May 28 '17 at 12:28
|
show 9 more comments
1 Answer
1
active
oldest
votes
Change your iptables rules by add multiport
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
And maybe is better to only have destination port [if you do not do port forwarding].
sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
sudo sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
You can check connection on udp port with nc
sudo nc -v -z -u <ip_address_of_server> <port>
You will get output, something like in my example connection on port 69 aka tftp
xxx@yyy~$ nc -u -v -z 10.10.10.10 69
Connection to 10.10.10.10 69 port [udp/tftp] succeeded!
Complete `iptables1 rules will be
Disable UFW
sudo uwf disable
Delete curent rules and chains in iptables
sudo iptables --flush
sudo iptables --delete-chain
allow loopback
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
drop ICMP
sudo iptables -A INPUT -p icmp --icmp-type any -j DROP
sudo iptables -A OUTPUT -p icmp -j DROP
allow established connections
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Allow UDP ports
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
allow SSH or some different TCP port
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
default policies
sudo iptables -P INPUT DROP
sudo iptables -P OUTPUT ACCEPT
Save
sudo iptables-save
This is it. I think :)
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f919712%2fopening-udp-ports%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Change your iptables rules by add multiport
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
And maybe is better to only have destination port [if you do not do port forwarding].
sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
sudo sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
You can check connection on udp port with nc
sudo nc -v -z -u <ip_address_of_server> <port>
You will get output, something like in my example connection on port 69 aka tftp
xxx@yyy~$ nc -u -v -z 10.10.10.10 69
Connection to 10.10.10.10 69 port [udp/tftp] succeeded!
Complete `iptables1 rules will be
Disable UFW
sudo uwf disable
Delete curent rules and chains in iptables
sudo iptables --flush
sudo iptables --delete-chain
allow loopback
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
drop ICMP
sudo iptables -A INPUT -p icmp --icmp-type any -j DROP
sudo iptables -A OUTPUT -p icmp -j DROP
allow established connections
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Allow UDP ports
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
allow SSH or some different TCP port
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
default policies
sudo iptables -P INPUT DROP
sudo iptables -P OUTPUT ACCEPT
Save
sudo iptables-save
This is it. I think :)
add a comment |
Change your iptables rules by add multiport
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
And maybe is better to only have destination port [if you do not do port forwarding].
sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
sudo sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
You can check connection on udp port with nc
sudo nc -v -z -u <ip_address_of_server> <port>
You will get output, something like in my example connection on port 69 aka tftp
xxx@yyy~$ nc -u -v -z 10.10.10.10 69
Connection to 10.10.10.10 69 port [udp/tftp] succeeded!
Complete `iptables1 rules will be
Disable UFW
sudo uwf disable
Delete curent rules and chains in iptables
sudo iptables --flush
sudo iptables --delete-chain
allow loopback
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
drop ICMP
sudo iptables -A INPUT -p icmp --icmp-type any -j DROP
sudo iptables -A OUTPUT -p icmp -j DROP
allow established connections
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Allow UDP ports
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
allow SSH or some different TCP port
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
default policies
sudo iptables -P INPUT DROP
sudo iptables -P OUTPUT ACCEPT
Save
sudo iptables-save
This is it. I think :)
add a comment |
Change your iptables rules by add multiport
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
And maybe is better to only have destination port [if you do not do port forwarding].
sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
sudo sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
You can check connection on udp port with nc
sudo nc -v -z -u <ip_address_of_server> <port>
You will get output, something like in my example connection on port 69 aka tftp
xxx@yyy~$ nc -u -v -z 10.10.10.10 69
Connection to 10.10.10.10 69 port [udp/tftp] succeeded!
Complete `iptables1 rules will be
Disable UFW
sudo uwf disable
Delete curent rules and chains in iptables
sudo iptables --flush
sudo iptables --delete-chain
allow loopback
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
drop ICMP
sudo iptables -A INPUT -p icmp --icmp-type any -j DROP
sudo iptables -A OUTPUT -p icmp -j DROP
allow established connections
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Allow UDP ports
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
allow SSH or some different TCP port
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
default policies
sudo iptables -P INPUT DROP
sudo iptables -P OUTPUT ACCEPT
Save
sudo iptables-save
This is it. I think :)
Change your iptables rules by add multiport
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
And maybe is better to only have destination port [if you do not do port forwarding].
sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
sudo sudo iptables -A INPUT -p udp -m udp --match multiport --dport 1025:65355 -j ACCEPT
You can check connection on udp port with nc
sudo nc -v -z -u <ip_address_of_server> <port>
You will get output, something like in my example connection on port 69 aka tftp
xxx@yyy~$ nc -u -v -z 10.10.10.10 69
Connection to 10.10.10.10 69 port [udp/tftp] succeeded!
Complete `iptables1 rules will be
Disable UFW
sudo uwf disable
Delete curent rules and chains in iptables
sudo iptables --flush
sudo iptables --delete-chain
allow loopback
sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A OUTPUT -o lo -j ACCEPT
drop ICMP
sudo iptables -A INPUT -p icmp --icmp-type any -j DROP
sudo iptables -A OUTPUT -p icmp -j DROP
allow established connections
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Allow UDP ports
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 27000:27030 --dport 1025:65355 -j ACCEPT
sudo iptables -A INPUT -p udp -m udp --match multiport --sport 4380 --dport 1025:65355 -j ACCEPT
allow SSH or some different TCP port
sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
default policies
sudo iptables -P INPUT DROP
sudo iptables -P OUTPUT ACCEPT
Save
sudo iptables-save
This is it. I think :)
edited May 28 '17 at 18:47
answered May 28 '17 at 18:42
27079742707974
8,02352138
8,02352138
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f919712%2fopening-udp-ports%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What NMAP command did you use?
– Robby1212
May 28 '17 at 12:23
NMAP ip_address
– Da black ninja
May 28 '17 at 12:23
What is the output of
nmap -p- ip_address?– Robby1212
May 28 '17 at 12:25
@Robby1212 i.imgur.com/4rYmZrm.png
– Da black ninja
May 28 '17 at 12:27
Huh, well those ports definitely aren't open that much is for sure.
– Robby1212
May 28 '17 at 12:28