• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Outbound NAT problem on OPT1 using OpenVPN

Scheduled Pinned Locked Moved NAT
7 Posts 3 Posters 846 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    leszekkazmierczak
    last edited by Dec 27, 2018, 12:40 PM

    I've pfsense installed with three interfaces: WAN, LAN, OPT1. My LAN is 192.168.1.0/24 and all machines on LAN side are connecting to the internet through OpenVPN client which was set up on OPT1 interface. My problem is on Outbound NAT.

    In my LAN network I have web service on 192.168.1.20 (port 80) and I try to connect to it from the rest of the world. The service is running (I can log in inside my 192.168.1.0/24 network) and it seems that firewall rules are ok because packets are passed on firewall (I enabled logs in Firewall settings to log it).
    It looks like NAT works and firewall passes packets to 192.168.1.20 but there is problem sending response back.

    My Port Forward rule looks like this:
    Interface: OPT1
    Protocol: TCP
    Source Address: *
    Source Ports: *
    Dest Ports: 6009
    NAT IP: 192.168.1.20
    NAT Ports: 80

    In Outbound I'm using manual Outbound NAT mode.
    My Mappings (LAN to WAN and LAN to OPT1) looks like this:
    Interface: WAN
    Source: 192.168.1.0/24
    Source port: *
    Destination: *
    Destination port: *
    NAT address: WAN address
    NAT port: *
    Static port: Randomize source port

    Interface: OPT1
    Source: 192.168.1.0/24
    Source port: *
    Destination: *
    Destination port: *
    NAT address: OPT1 address
    NAT port: *
    Static port: Randomize source port

    I've got localhost to WAN, localhost to OPT1 mappings also but I think they're not a problem in my case.

    Can you help me?

    L 1 Reply Last reply Dec 27, 2018, 1:41 PM Reply Quote 0
    • L
      lcbbcl @leszekkazmierczak
      last edited by Dec 27, 2018, 1:41 PM

      @leszekkazmierczak I am far from being a guru,but you want to access your webserver from the VPN ip?that it should be inbound and "see" the VPN interface as a wan interface.When you created the forward rule for OPT1 did you select add associated filter rule?

      1 Reply Last reply Reply Quote 0
      • L
        leszekkazmierczak
        last edited by Dec 27, 2018, 2:09 PM

        Yes I did. Port Forwarding creates Firewall rules by default in my version of pfsense.

        L 1 Reply Last reply Dec 27, 2018, 3:06 PM Reply Quote 0
        • L
          lcbbcl @leszekkazmierczak
          last edited by Dec 27, 2018, 3:06 PM

          @leszekkazmierczak i never test to connect to my internal server using pfsense as vpn client ,i allways did from my ISP ip and was ok.
          Now i try your way and i am not able to connect back,we miss some info(i will read more this night) or vpn provider has blocked incoming connections.
          Your problem become mine also:)) maybe someone more skilled will give us a hand.

          1 Reply Last reply Reply Quote 0
          • L
            leszekkazmierczak
            last edited by Dec 27, 2018, 5:11 PM

            It's not ISP problem in my opinion. I used TP LINK router connected with the same VPN service and everything worked fine, including port forwarding.

            1 Reply Last reply Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by Dec 27, 2018, 5:21 PM

              For starters actually post screenshot of your rules... If I had a nickel for every time user said they did X, when rules were actually Y, etc..

              And then clearly state what you think is not working correctly... Which actual screen shots of your sniffs as the traffic hits your wan side interface and then doesn't get forwarded or is forwarded out your lan side interface to your IP, etc..

              Or TLDR - RTFM!
              https://www.netgate.com/docs/pfsense/nat/port-forward-troubleshooting.html

              Then come back with specific questions if you have some..

              Why are you using manual nat? Just use hybrid to allow traffic to go out your vpn, etc. Post up your OUTBOUND nat tab..

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

              1 Reply Last reply Reply Quote 0
              • L
                leszekkazmierczak
                last edited by Dec 27, 2018, 6:25 PM

                Sorry, but I've been studying documentation for a couple of days till now where Im really stuck :(

                Outbound rules:
                0_1545934794424_Zrzut ekranu 2018-12-27 o 19.17.03.png

                Port forwarding:
                0_1545934820873_Zrzut ekranu 2018-12-27 o 19.17.37.png

                and connected Firewall rule:
                0_1545934844145_Zrzut ekranu 2018-12-27 o 19.18.39.png

                Firewall passes packets:
                0_1545934893441_Zrzut ekranu 2018-12-27 o 18.26.39.png

                but blocks connections back:
                0_1545934947454_Zrzut ekranu 2018-12-27 o 18.17.22.png

                and I dont know the reason because Im not filtering LAN to OPT1 connections:
                0_1545935068766_Zrzut ekranu 2018-12-27 o 19.23.38.png

                1 Reply Last reply Reply Quote 0
                1 out of 7
                • First post
                  1/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received