[SOLVED] Port forward

  • Hello, im new in pfsense! i am trying to forward the port 21 from my NAS, and it works..  until i enter my username and password after that it doesn't do anything for 20 seconds only it shows me the error message that : make sure you have permission to access that folder. Details :  the operation timed out . what am i doing wrong ?

  • ok, i have tested multiple port and none is working my setup is

    internet ->  pfsense    - >        router                  - >      pc
                        (DHCP)          ( Disabled DHCP )        - >  laptop
                                                                                  - >    nas

    i wanted to forward to port 21 , or just help me to forward any other port

  • LAYER 8 Global Moderator

    Port 21, so the control channel of ftp then.

    How are you accessing this – from something on or actually outside your network?

    Are you using active or passive ftp?  This also comes into play.


    I personally would not suggest you open ftp to the public internet - not unless your using really strong passwords.. Even then I would not suggest it.  Does your nas support sftp?  With public key auth?  Why not just vpn into your network and then access your nas file shares via whatever method you want.

  • i have tried to setup pptp and i think it was working good only that i didn't have no internet access on the vpn, and i cant setup a dns(no-ip.org) for my pfsense for some reason. Well i did setup the dns but i can only access from inside my network not true the internet http://myserv.no-ip.biz/ this link should point at my router(pfsense)

  • LAYER 8 Global Moderator

    Well that points too

    ;myserv.no-ip.biz.              IN      A

    myserv.no-ip.biz.      60      IN      A

    Is that your public IP?  I show that in RO

    inetnum: -
    netname:        RO-RESIDENTIAL
    descr:          RCS & RDS Residential
    descr:          City: Sibiu
    country:        RO

    role:          Romania Data Systems NOC
    address:        71-75 Dr. Staicovici
    address:        Bucharest / ROMANIA

    As to accessing it from only inside - did you create the firewall rules to allow whatever it is you want to access, and forward ports to what you want to access?

    " i didn't have no internet access on the vpn"

    At a loss to what that is suppose to mean, so outside your network you vpn into your pfsense box..  And then you want internet access through that connection?  Then you need to setup pfsense to do that, etc.  But that is outside the scope of accessing your network vpn for access to your local resources.

  • i have dinamic ip and i connected my ip to a free dns,  but my router is not communicating outside. And i wanted to have internet possibility on my vpn because my girlfriend is in china and alot of website is restricted for countries.The ftp port was used a lot of time and never head any problems.

  • LAYER 8 Global Moderator

    What do you mean your router is not communicating outside?

    I vpn into my pfsense from work almost every single day, and route internet traffic through it all the time.  You can either set your vpn connection to be set as the gateway.. In openvpn this is the checkbox called redirect gateway

    "Force all client generated traffic through the tunnel. "

    PPTP can be setup on the client to do this, etc.  But I would not use pptp to be honest.. It is deprecated and not considered secure, etc.

    What do you have in front of pfsense?  Most likely a NAT router I would guess and pfsense is not getting a public IP on its wan/internet connection.

    FTP is not secure, username and passwords are sent in clear text.. And I can tell you for fact that having ftp exposed to the internet will have lots and lots of brute force attempts against it, etc.  It is NOT secure..  But do what you want - I wouldn't suggest it though.  Unless this ftp server is just anonymous and open to the public, etc. to serve files.

    Who needs to access these ftp files - you are users or random users on the internet?

    The protocol is not very nat friendly, you have control channel and then data channel.  You have active and passive type connections that can connectivity through nats kind of a PITA.  Especially if both sides are natted, etc.

    What I would suggest for your 2 different questions.. Is use openvpn to allow your GF to use your connection as internet connection, it can run on tcp or udp and if ran on say the ssl port 443 over tcp.  Its highly unlikely to be blocked.  It requires just the one port and is easier to connect to and setup behind a nat than PPTP which uses different protocols and ports..  And I would have to think the great firewall of china would filter pptp for sure..

    I would also just leverage this vpn connection to access whatever resources you need to access on your own network, be via ftp, http, webdav, sftp, ftpes, smb/cifs, whatever while your outside your network or other users you want to access your network resources.

    Another simple option is simple tunnels over ssh connections.  Your gf could use this as tunnel through her issues, as well could be used to access your resources on your network very easy.  Its a poor mans vpn ;)

    Lots of ways to skin the cat, but ftp is antiquated and not secure - I would not suggest it.

  • the pfsence is my gateway, it receives the ip from my internet providers true pppoe and i have dynamic ip Ii will try to setup openvpn but i seen that you have to install some additional programs to access the vpn ,and what rules i have to set up to have internet over the vpn?

  • LAYER 8 Global Moderator

    Yes there is a openvpn client - just install the export package, makes it easy.

    As to rules, you need to check the box that says redirect gateway.. Thats really all there is.  What firewall rules you setup to limit or allow access from the vpn clients into your network is up to your requirements.

  • i have checkt the box for "Force all client generated traffic through the tunnel." and i tried to connect to my vpn … it connected but i didn't have any internet access so it means something gone wrong :(

  • LAYER 8 Global Moderator

    And did you run the client as admin, you can not set routes on windows 7 without admin rights?

    And your connecting to this from OUTSIDE pfsense?

  • i started the VPN program as "Run as administrator" , but i didn't try it from outside only from inside that can be the problem? i'm going to send the program for a friend and i hope it works,i will be back with the results :)

  • LAYER 8 Global Moderator

    if you want someone to test it that is actually literate in how this stuff works ;)  You could send me the configuration archive.  I don't need the software.  And just let me know any other resources you would like me to verify and or if just my internet goes through this connection, etc.

    And I can show you the routing that makes it work, etc.

  • ok where should i send you the file?

  • LAYER 8 Global Moderator

    I will PM you my personal email.

    BTW - they clearly did not run as admin, since you see the access denied on adding the routes.

    Also your just running on UDP 1194, this is default – I can almost promise you this is NOT going to be open outbound from someone behind the China Firewall..  I would have your openvpn listen on tcp on a common port that is open, 443 or 80, etc.

    Even then I would think that China is doing deep packet, and might be able to tell that its a openvpn connection.. Even though openvpn is ssl based vpn.  You can tell its not a typical handshake, etc.  You might need to hide the vpn traffic inside another ssl tunnel, etc.

    But lets take baby steps and make sure your server actual works ;)

  • LAYER 8 Global Moderator

    I got your email, but you only sent the ovpn file - and not the inline version that has the certs imbedded.  Please send the archive, ie ZIP file.. First download option in export client package tab.  This will include the certs needed to make the connection.

  • LAYER 8 Global Moderator

    Ok I got in, but your not handing out any dns.. And seems your behind a double nat?

    Here I connected just fine and get a route out

    IPv4 Route Table

    Active Routes:
    Network Destination        Netmask          Gateway      Interface  Metric

    But you have a mask??  huh?  Going to turn on logging and connect again ..

    But I can trace out using you

    C:>tracert -d

    Tracing route to over a maximum of 30 hops

    1  154 ms  152 ms  152 ms
      2  155 ms  155 ms  154 ms
      3  154 ms  212 ms  155 ms
      4  154 ms  155 ms  156 ms

    That 2.1 is you – but why do I hit 10.x.x.x addresses ?

    And since I am on as well - going to be a bit of a problem.. I would suggest you change your lan to oddball network, maybe or something -- this is highly unlikely to match up with any outside networks connecting into yours.

    edit.. Ok here is log attached, you can see I make connection just fine.. Have an issue with our overlapping networks so I would never be able to get to your local network.  If I had dns given out, is pfsense and should work, but I can not get into your pfsense because of security check you have enabled. see other attachment

  • so i should change my dhcp to ? and i have nooo idea what is

  • it shows me that is the Gateway ….

    How to disable the security check?

  • LAYER 8 Global Moderator

    What do you have in front of pfsense? something is  – that is NOT a routable public address is a nat to rfc1918 from a public address.

    I would change your local network, pfsense address and yes dhcp to be a different network other than common -- I could change mine - but you most likely will run into this problem with other users, or other locations you come from.

    If you check this, I should be able to get into your openvpn config and fix up some stuff. about dns, etc.  And look at your wan IP and see if your behind nat, etc.

  • done!

    and i don't have anything in front of pfsense..  :-\

  • LAYER 8 Global Moderator

    Ok I got in.. But I found your running proxy!!  Well explains my issue with being able to query dns once handed to me, but not able to access any sites..

    I will have to look deeper.. But why do you need that proxy running?  And why do you have specific routes to your dns that are .1?

    Yeah your ISP is clearly natting your connection, etc.  But since I can hit you on 1194, it must be a 1:1 nat – they allow traffic into you.  Can you change your network - so I can point to your proxy.  I am also on and quite likely your friend in china could be on that very common network as well.

  • ok, i try to find find where should i modified.
    And i activated the proxy for chasing but normally it's not working very well for me  :P

  • LAYER 8 Global Moderator

    Can we turn it off - then I should be able to use internet through your connection

    if your friend is not on or 192.168.2. which you used for your tunnel network you should be fine.  Other than fact I don't believe china will allow outbound connection on udp 1194 which is the default openvpn port..

  • i had to get it back to factory reset  :-\ bat the good this is that it's brand new :)
    i disabled the enforcement check but i have to setup the vpn 5 min

  • LAYER 8 Global Moderator

    Not for changing an IP you wouldn't  All you needed to do was change the lan IP to new network.

  • what should i put in " Tunnel Network: " ? ?

  • LAYER 8 Global Moderator

    No that is a COMMON network.. something NOT common..  I use for one of mine, and for the other one.. I run openvpn both on tcp 443, and udp 1194

    Pick something out of the rfc1918 space that you feel is not common! but using the first networks in the space is very common.  Every soho router I have seen defaults to or etc.. ;)  Not good networks to use if you might have other users connecting to you via vpn.

    Then the next few are used because it makes sense.. So I have 3 segments on my network lan, wlan and dmz - I use and

    So if you want to make sure your not going to step on such a setup on the remote side.. You would want to use something odd ball like the network I just pulled out of thin air ;)

    Which I am off next week, might be about time I changed my address space around to be outside norm when helping people like you.

  • i sent you the ZIP file to your mail, i changed all my passwords i hope it's good now  :D

  • LAYER 8 Global Moderator

    Yup rocking internet through your connection.. As you can see when connected I show your IP, 5.x.x.x and when not connected I show my normal IP.

    your not handing out dns.. So unless they can pull dns from their local connection still you could have issues, and they won't be able to resolve anything on your eve.local as you had it before.

    Hand out your pfsense lan IP if your using dns forwarder.  Also Just becuase you use some random high port does not mean china would not block that.  Most companies block uncommon ports outbound.

    For example in a network, you might only be able to to http and https outbound.  Or you might even have to use a proxy.  Which is nice that openvpn can bounce off a proxy, etc.  But some random 30K port is unlikely to be allowed outbound from china??  But hey you can try.

    But as you can see your currently routing outbound to the internet through your vpn connection.  Now if any local resources you would like me to verify – just send me details.

  • when i exporting the user can i use " Host Name Resolution : DynDNS " ? because i have dynamic ip

  • LAYER 8 Global Moderator

    Yeah that should work..

    Just send your friend the installer package because they unlikely to have openvpn installed.

    If you want you can send to me with your hostname config zip and I can test that for you.

    Have Fun!!!

    If does not work with your high udp port, try tcp 443 or 80..  If that does not work then have to work out what can get through the china firewall - happy to help if you run into more questions.

  • Thanks! i sent to you the mail to test the connection with dyndns.  ;D

    Thanks for helping me out!

  • LAYER 8 Global Moderator

    That is not working?  I resolve the address just fine.. I can PM you the IP it resolve too.  But timing out connecting

Log in to reply