Linux-Noob Forums

Full Version: Problem with ports
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I install team speak server on my linux VPS.

 

I use

 

iptables -A INPUT -i eth0 -p tcp --sport 14534 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -i eth0 -p tcp --sport 8767 -m state --state NEW,ESTABLISHED -j ACCEPT

 

To open tcp 14534 and tcp 8767 tcp ports. First is for web admin for team speak seccond is for team speak client

 

after that I run

 

service iptables restart

 

And all work fine I can access to my web admin http://ip addrreess:14534 and also I can connect to server with my teamspeak client by coling http://ip address:8767

 

But few minutes later (about 3-4 minutes) all stop working and I caan access to my web admin and I cannt log to teamspeak client

 

When I again call this function

 

service iptables restart

 

All work fine again but again for 3 or 4 minuts

 

Please help me. Seams that my ports close every 3-4 minutes I dont know what i to do

 

PLEASE HELP MEEE

interesting problem, what linux distro is this and what version ?

Firstly, you may want to find the file containing your ruleset - something like /etc/sysconfig/iptables (for RPM-based distros).

 

Then edit that file and put your entries in there, something like:



Code:
-A INPUT -p tcp -m tcp --dport 14534 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8767 -j ACCEPT




 

My guess is that the "service iptables restart" is restarting IPtables, re-reading rules from that file, flushing out dynamic rules you've just added.

 

To view the current rules, use:



Code:
iptables -L -n | more




(the -n = "do NOT resolve IPs to hostnames")

- may be an idea to spam that output here first, just to show the current rules - curious to know if you've got any OUTPUT rules that are blocking server traffic back to the client.

 

And as Anyweb says: what distro are you using?