Open ports Linux/Centos
#1

Hi Guys, i am having this problem from lot time and untill today i haven't solved it yet, i need to open my ports without disable all Centos Firewall (iptables), someone knows which code will open a specify port without off the full firewall of my VPS?
Infact, my server shows online when i disable the firewall, and when i active it and open specify ports it's doesn't show online....

Thanks to all repliers
Reply
#2

Hello,

iptables -A INPUT -p tcp -m tcp --dport 7777 -j ACCEPT
/etc/init.d/iptables save

You can use the above to open port 7777 (the SA:MP default), and then save the rule to ensure it's persistent upon the iptables service getting restarted.

To check the status of a port, you may like to check out: http://www.yougetsignal.com/tools/open-ports/

For what it's worth, IPTables can be flushed and disables using:

iptables -F
service iptables save
service iptables stop
Reply
#3

Quote:
Originally Posted by MustangV10
Посмотреть сообщение
Hello,

iptables -A INPUT -p tcp -m tcp --dport 7777 -j ACCEPT
/etc/init.d/iptables save

You can use the above to open port 7777 (the SA:MP default), and then save the rule to ensure it's persistent upon the iptables service getting restarted.

To check the status of a port, you may like to check out: http://www.yougetsignal.com/tools/open-ports/

For what it's worth, IPTables can be flushed and disables using:

iptables -F
service iptables save
service iptables stop



SA-MP Server use UDP protocol over IPv4 and not TCP !


Rodri99,

You can add this iptables rule (into your iptables Shell script or your firewall rules) to allow incoming traffic for 7777 (you can change it) destination port.

Код:
iptables -A INPUT -p udp --dport 7777 -j ACCEPT
If you still having problems, pleas let us to know.
Reply
#4

Quote:
Originally Posted by LinuxViper
Посмотреть сообщение
SA-MP Server use UDP protocol over IPv4 and not TCP !
announce uses tcp to query to sa-mp master list

right
Reply
#5

Thanks a lot guys, i will try it when my server will got some few players on
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)