LinuxQuestions.org
Review your favorite Linux distribution.
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 08-16-2012, 05:10 AM   #1
vichor
LQ Newbie
 
Registered: Aug 2012
Location: Spain
Distribution: ubuntu
Posts: 7

Rep: Reputation: Disabled
Question Bazaar (bzr) port (4155) is open or closed?


Hi all,

I have a small bazaar (bzr) server at home, just for fun. In my LAN, I can with no problem download/upload branches from/to the server.

Yesterday I decided to open the port to be able to access the repository from my office, so I changed my router configuration to open the port and checked my server's iptables and so on. Even I created a script to email me my public IP when changed (and this works! ).

Well, my knowledge on networking is quite limited, so I just used the router's web to open the port (in fact, I already opened it when I created the server months ago, but I didn't remember this), and used Firestarter on the server to set up its iptables.

Checking with nmap, the port is reported as open in my server if using the local IP (192.168.blahblah), but reported as closed when using public IP.

Besides, if I try a bzr command, it works using the local IP address, but again it does not work with the public IP.

Testing also telnet over port 4155 (bzr's default) does not work with public IP.

But, when checking port availability through this web, it is reported as open.

So, the port is actually open or closed? I assume the answer is "closed. In this case, which is the problem and how may I fix it?

Thanks!!
 
Old 08-16-2012, 08:09 PM   #2
frankbell
Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Mageia, Mint
Posts: 7,959

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
The first question that comes to me is this: Is port forwarding configured in the router to forward incoming calls on that port to the bzr server?
 
Old 08-17-2012, 01:08 AM   #3
vichor
LQ Newbie
 
Registered: Aug 2012
Location: Spain
Distribution: ubuntu
Posts: 7

Original Poster
Rep: Reputation: Disabled
I think I configured the port forwarding in the router. I assigned the port 4155 to the server's address using the NAT configuration web interface of the router. Anyway, I will double check this this afternoon at home.
 
Old 08-17-2012, 01:56 PM   #4
vichor
LQ Newbie
 
Registered: Aug 2012
Location: Spain
Distribution: ubuntu
Posts: 7

Original Poster
Rep: Reputation: Disabled
OK I have checked the router's iptables and filtering about 4155 port I see this:

Chain USERFORWARD (1 references)
target prot opt source destination
...
ACCEPT udp -- anywhere 192.168.1.111 udp dpt:4155
ACCEPT tcp -- anywhere 192.168.1.111 tcp dpt:4155
...

There is no other rule regarding the 4155 port.

Is this a proper port forwarding?
Of course, 192.168.1.111 is the address of the server.
 
Old 08-18-2012, 02:55 PM   #5
vichor
LQ Newbie
 
Registered: Aug 2012
Location: Spain
Distribution: ubuntu
Posts: 7

Original Poster
Rep: Reputation: Disabled
More details about the router's iptables:

Code:
# iptables -nvL -t nat
Chain PREROUTING (policy ACCEPT 4466 packets, 305K bytes)
 pkts bytes target     prot opt in     out     source               destination     
...
    0     0 DNAT       tcp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           tcp dpt:4155 to:192.168.1.111 
    0     0 DNAT       udp  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           udp dpt:4155 to:192.168.1.111
So the prerouting chain is there. And checking the Forward rule:

Code:
# iptables -nvL
Chain FORWARD (policy ACCEPT 120K packets, 13M bytes)
 pkts bytes target     prot opt in     out     source               destination         
...
 168K  207M USERFORWARD  all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           
...
    0     0 DROP       all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           

Chain USERFORWARD (1 references)
 pkts bytes target     prot opt in     out     source               destination         
...
    0     0 ACCEPT     udp  --  ppp0   *       0.0.0.0/0            192.168.1.111       udp dpt:4155 
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            192.168.1.111       tcp dpt:4155 
...
It seems that the port forwarding is there :S

Do the order of the rules have something to do? Is it possible for a previous rule to be forbidding the connection?
 
  


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
Bazaar (bzr) port (4155) is open or closed? vichor Linux - Networking 1 08-16-2012 11:17 AM
bzr / precise - how to override plugins path for an alternate installation of bzr? eantoranz Linux - Software 0 05-09-2012 09:47 AM
Port 25 closed...can't open 60s TV Batman Fedora 14 03-22-2007 10:51 AM
2.4.20-8 port 25 closed, cant open mwmethe Linux - Networking 4 10-27-2004 02:54 PM
2.4.20-8 port 25 closed, cant open mwmethe Linux - Networking 1 10-27-2004 01:37 PM


All times are GMT -5. The time now is 01:37 PM.

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