Bitcoin Forum
May 13, 2024, 09:43:42 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why is IPTABLES periodically blocking port 8333?  (Read 2288 times)
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
July 19, 2011, 09:51:59 AM
 #1

Hi, I have a simple question. I've disabled UPnP from bitcoin.conf. Here are my IPTABLE rules regarding port 8333:

Code:
-A INPUT -p tcp --dport 8333 -m state --state NEW -j ACCEPT

However, using netstat shows that there are tons of connections from other nodes onto my server from port 8333. Periodically, I see in the IPTABLES log that a few packets going to port 8333 are being rejected, why is this the case? I do allow ESTABLISHED and RELATED connection packets through.

Also, can anybody tell me why there are also other random ports that are showing as a destination on netstat? I thought Bitcoin only used port 8333 for connecting to other nodes and 8332 for the API.


1715636622
Hero Member
*
Offline Offline

Posts: 1715636622

View Profile Personal Message (Offline)

Ignore
1715636622
Reply with quote  #2

1715636622
Report to moderator
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715636622
Hero Member
*
Offline Offline

Posts: 1715636622

View Profile Personal Message (Offline)

Ignore
1715636622
Reply with quote  #2

1715636622
Report to moderator
1715636622
Hero Member
*
Offline Offline

Posts: 1715636622

View Profile Personal Message (Offline)

Ignore
1715636622
Reply with quote  #2

1715636622
Report to moderator
CERN
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
July 19, 2011, 01:21:06 PM
Last edit: July 19, 2011, 01:47:25 PM by CERN
 #2

It could be that another rule preceding the one in question is rejecting or dropping connections. I'm afraid that it's impossible to give an answer about why it's happening without seeing your full iptables ruleset

As for the second question:

Quote from: Gavin Andresen
Bitcoin 0.3.24 adds a   -port=  option to listen on a port other than 8333 for incoming connections.

(a quote from this post)

Along with upnp, etc...  The short answer is that your bitcoin client is likely connecting to peers that are just using a port other than 8333 Smiley
Chick (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
July 20, 2011, 07:42:55 AM
 #3

It could be that another rule preceding the one in question is rejecting or dropping connections. I'm afraid that it's impossible to give an answer about why it's happening without seeing your full iptables ruleset

As for the second question:

Quote from: Gavin Andresen
Bitcoin 0.3.24 adds a   -port=  option to listen on a port other than 8333 for incoming connections.

(a quote from this post)

Along with upnp, etc...  The short answer is that your bitcoin client is likely connecting to peers that are just using a port other than 8333 Smiley

Never mind that, I've solved it. The remote host basically couldn't complete the data transfer and issues a ACK/FIN tcp packet to close the connection, but my server drops and logs the request.

Thanks!

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!