Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couchdb as windows service - remote access

Tags:

couchdb

I have couchdb running on two computers (one Windows 7, the other Windows 8). If I do not run couchdb as a windows service (Windows 7), I can access it from a remote computer through the firewall. If I run a couchdb instance as a windows service (same, Windows 7) I can only access it if I turn off the firewall of machine hosting the instance I am trying to access. CouchDB configurations are the same in both cases. (the two machines are on a local network)

I don't know that much about advanced firewall settings but I tried changing what seems logical to me and it didn't help.

What exactly needs to be changed in the firewall settings to allow couchdb instance running as a service to be accessed remotely?

UPDATE: Fixed it! Followed the instructions under 1c from this link :

"(1c) Windows 7

Navigate through to Control Panel > Windows Firewall

Click on "Advanced Settings" in the left-hand pane.

Click on "Inbound Rules" and then "New rule".

Select "Port", click next then select "TCP" and enter "5900 as the local port.

Click next, and allow the connection.

Click next again, and ensure that "Domain", "Private" and "Public" are all ticked.

Name your firewall rule, then save it."

and used CouchDB's port (5984).

like image 568
Aineko Avatar asked Jul 09 '14 02:07

Aineko


1 Answers

You'll need to open ports 5984 (CouchDB HTTP API) and 6984 (CouchDB over HTTPS). From an elevated command prompt, try:

netsh advfirewall firewall add rule name="CouchDB/HTTP"  dir=in action=allow protocol=TCP localport=5984
netsh advfirewall firewall add rule name="CouchDB/HTTPS" dir=out action=allow protocol=TCP localport=5984

and repeat with 6984 too.

like image 160
dch Avatar answered Oct 02 '22 00:10

dch