Bitcoin Forum
May 04, 2024, 09:11:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [solved] LNBits won't start due to python error  (Read 277 times)
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
November 01, 2021, 09:24:11 AM
 #21

2. Your initial router firewall configuration is bypassing Nginx, so, it directly connects into Hypercorn(LNBits)
You say my router firewall is bypassing Nginx. I'm not sure I understand. Sorry.
Do note what @DaveF said:
Quote
However, if you have your firewall set to pass traffic from the internet to Hypercorn (port 5000) this entire process falls apart. Since now I can see hypercorn in the world.

Technically; What he means and also I said the word "initial", it pointed to:
Code: (router firewall rule)
config redirect                                                                 
        option dest_port '5000'                                                
        option src 'wan'                                                        
        option name 'lnbits'                                                    
        option src_dport '5000'                                                
        option target 'DNAT'                                                    
        option dest_ip '192.168.1.153'                                          
        option dest 'lan'                                                      
        option proto 'tcp'
With above config, the internet is directly communicating with Hypercorn. It's because the dest_port is pointed to Hypercorn port, 5000.

But since you are now using the correct config:
Code: (router firewall rule)
option dest_port '5001' 
The current and correct internet flow is as described by @HCP.

After reading @DaveF post, I'm not sure I understand this. @DaveF says that internet is passing traffic to Nginx (encrypted) and then Nginx passes it to Hypercorn (unencrypted) and then, Hypercorn passes it back to Nginx again and finally Nginx passes it back to whatever application is listening on that port.
Regarding that, What *I think* he explains is he taking the context of the correct firewall rule config. and it is furtherly explained well by HCP.

Anyway, sometimes I have a hard time to wording and explaining a technical term, so I hope you bear with me  Tongue

Oh, yes, I got it.

I  will double check that my router config is forwarding the traffic to port 5001 and not 5000 by accident.

One more question. This one is not exactly related to the configuration itself but I'll ask it anyway.

You guys know what is the meaning of the following 2 lines in the configuration of my router? What means each one?
Code:
option dest_port '5001'

and

Code:
option dest_dport '5001'

What means, for instance, if I use 2 different ports there?

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
1714857109
Hero Member
*
Offline Offline

Posts: 1714857109

View Profile Personal Message (Offline)

Ignore
1714857109
Reply with quote  #2

1714857109
Report to moderator
1714857109
Hero Member
*
Offline Offline

Posts: 1714857109

View Profile Personal Message (Offline)

Ignore
1714857109
Reply with quote  #2

1714857109
Report to moderator
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714857109
Hero Member
*
Offline Offline

Posts: 1714857109

View Profile Personal Message (Offline)

Ignore
1714857109
Reply with quote  #2

1714857109
Report to moderator
1714857109
Hero Member
*
Offline Offline

Posts: 1714857109

View Profile Personal Message (Offline)

Ignore
1714857109
Reply with quote  #2

1714857109
Report to moderator
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
November 01, 2021, 11:25:31 AM
Merited by darkv0rt3x (2)
 #22

I guess you mean dest_port and src_dport. Either way, you can refer to the documentation below to see the details.

https://openwrt.org/docs/guide-user/firewall/firewall_configuration?s=destination&s=port#options4:
Code:
Name 	Type 	Required 	Default 	Description 
src_dport port or range no (none) For DNAT, match incoming traffic directed at the given destination port or port range on this host.
dest_port port or range no (none) For DNAT, redirect matched incoming traffic to the given port on the internal host.

For the full documentation of what the firewall means, you can see: Redirect and Port forwarding for IPv4 (DNAT)
darkv0rt3x (OP)
Hero Member
*****
Offline Offline

Activity: 1204
Merit: 658


I rather die on my feet than to live on my knees


View Profile
November 01, 2021, 08:05:16 PM
 #23

I guess you mean dest_port and src_dport. Either way, you can refer to the documentation below to see the details.

https://openwrt.org/docs/guide-user/firewall/firewall_configuration?s=destination&s=port#options4:
Code:
Name 	Type 	Required 	Default 	Description 
src_dport port or range no (none) For DNAT, match incoming traffic directed at the given destination port or port range on this host.
dest_port port or range no (none) For DNAT, redirect matched incoming traffic to the given port on the internal host.

For the full documentation of what the firewall means, you can see: Redirect and Port forwarding for IPv4 (DNAT)


Ok, ignore... I was stupid!

I'll call this thread solved.
Thanks @DaveF, @vv181 and @HCF

Bitcoin is energy. Bitcoin is freedom
I rather die on my feet than living on my knees!
Pages: « 1 [2]  All
  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!