3.2 C
New York
Wednesday, December 4, 2024

firewall – How you can ahead port 80 and 443 on pfSense to a (inside) nginx webserver?


Yesterday we did a “huge bang” firewall swap in our firm. Our new firewall is a pfSense server.
Shall we say our exterior ip is 84.1.1.1, pfSense is 192.168.1.1 and our internet server ip is 192.168.1.2.


After we made the “huge swap”, the pfSense interface was responding on https://84.1.1.1, this isn’t supposed as we need to use https://84.1.1.1 (port 443) for our internet server. For that reason i modified the pfSense port from 443 to 444 which “solved” this difficulty as port 443 is “free” for different companies now.

We cannot enable entry to the pfSense interface from our exterior ip in any respect however that’s one other drawback which is off matter.


Now i wan to ahead port 443, 80 (and in future some extra) to servers in our community. For this i first need to clarify how i configured the WAN connection as i observed one thing.

I attempted to ping (with the pfSense ping diagnostic software) from WAN1 (our WAN) to the net server. This didn’t work which implies that my port forwarding additionally cant work in any respect. I believe that pfSense tries to resolve this ping request by way of its gateway so i attempted to set the gateway of WAN1 to none and from this second on i can ping the webserver from WAN1 (by way of the pfSense ping diagnose software).

Query: Do i must set a Gateway to our WAN1? I suppose sure? And if sure, do i must make some exclusions for inside community someplace? Simply as additional information, perhaps its required, we have now a static IP which instantly hangs on pfSense…

pfSense configuration

WAN INTERFACE
    
        igb0
        
        
        32
        
        
        84.1.1.1
        30
        WAN1GW
    

GATEWAY
    
        WAN1GW
        
        
            wan
            84.1.1.2
            WAN1GW
            1
            inet
            
        
    

OUTBOUND NAT RULES
    
        
            superior
            
                
                    10.128.10.0/24
                
                
                
                
                
                
                wan
                
                
                
                
                
                    
                
                500
                
                    
                    
                
                
                    
                    [email protected] (Native Database)]]>
                
            
            
                wan
                
                    10.128.11.0/24
                
                500
                
                
                    
                
                
                
                
                    
                    
                
                
            
            
                
                    10.128.20.0/24
                
                
                
                
                
                
                wan
                
                
                
                    
                
                
                    
                    [email protected] (Native Database)]]>
                
                
                    
                    [email protected] (Native Database)]]>
                
            
            
                
                    10.128.10.0/24
                
                
                
                
                
                
                wan
                
                
                
                    
                
                
                    
                    [email protected] (Native Database)]]>
                
                
                    
                    [email protected] (Native Database)]]>
                
            
            
                
                    10.128.12.0/24
                
                
                
                
                
                
                wan
                
                
                
                    
                
                
                    
                    [email protected] (Native Database)]]>
                
                
                    
                    [email protected] (Native Database)]]>
                
            
            
                
                    10.128.11.0/24
                
                
                
                
                
                
                wan
                
                
                
                    
                
                
                    
                    
                
                
                    
                    [email protected] (Native Database)]]>
                
            
        
    

In regards to the forwarding itself, i configured it like this:

enter image description here
as i set Filter rule affiliation to Add related filter rule throughout the creation of the Port ahead, pfSense robotically created the corresponding/required firewall rule on the WAN1 port.

enter image description here

Query: Do i want some further configurations to ahead port 443 and 80 close to the configuration i already did? (the port ahead and creating the required firewall guidelines)

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles