LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-15-2011, 02:33 PM   #1
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Rep: Reputation: 16
iptables issue outbound ports?


Hey all,
I recently ran into a funny issue with what appears to be iptables. I have a php script that needs to contact a mysql server remotely, and it does so through a couple outgoing ports. (ports 10060, 27017 and 27167)

I opened them up in the firewall (csf), but after a few successful connections, I start to get no connection past the SYN_SENT portion. That is until I issue the following commands.

Code:
[root@blah ~]# telnet dbh61.mongolab.com 27617
Trying 184.73.186.245...
[root@blah ~]# /etc/init.d/iptables restart
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: mangle filter nat         [  OK  ]
Unloading iptables modules:                                [  OK  ]
[root@blah ~]# telnet dbh61.mongolab.com 27617
Trying 184.73.186.245...
Connected to dbh61.mongolab.com.
Escape character is '^]'.
Any ideas?
 
Old 11-16-2011, 06:33 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,454
Blog Entries: 54

Rep: Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896Reputation: 2896
Quote:
Originally Posted by lsteacke View Post
Any ideas?
Yeah, but only that changing any conditions like resetting iptables state and rules without recording any diagnostics output beforehand doesn't really help solve things. Running 'telnet' may seem nice but it doesn't convey anything except the connection gets stuck. Next time using tcptraceroute (and not ping or traceroute as you're not interested in ICMP or UDP connections) instead and temporarily adding "-j LOG" rules to check rule traversal may help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how? redirect apache2 outbound ports to specific ports w/iptables? nowshining Linux - Security 5 05-27-2008 02:46 AM
Inbound vs Outbound ports? olddocks Linux - Security 3 02-10-2008 12:19 AM
iptables outbound traffic to all ports sunlinux Linux - Security 1 12-01-2007 10:46 AM
are outbound ports converged while local ports are ok ? inanc Linux - Networking 0 02-06-2007 10:37 AM
How does linux allocate outbound ports ? genese Linux - Networking 2 12-21-2006 04:24 AM


All times are GMT -5. The time now is 09:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration