pfSense Gold Subscription

Author Topic: Activate NAT function on pfsense  (Read 4852 times)

0 Members and 1 Guest are viewing this topic.

Offline Fiona

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Activate NAT function on pfsense
« on: November 23, 2011, 04:16:13 am »
Hello,
I just started to use pfsense and i need to activate the NAT function
I followed the steps indicated on the website (how to configure ...) but it doesn't work as expected :/
The rules are well defined (i guess...) but pfsense is working as a "bridge" : it transfers the packets from the WAN to the LAN interface but doesn't direct the packet to the destination specified in the rule

I could use some help

Thanks in advance!

[Edit] I changed my configuration so pfsense not working as a bridge no more but still doesn't NAT the packets eventhough the rule is specified
« Last Edit: November 23, 2011, 04:31:44 am by Fiona »

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #1 on: November 23, 2011, 04:38:41 am »
Start by giving more information.
Good thing to have is "i made rule, wanted to see, and what i see is.."
can you send screenshots of your rules.

Offline Fiona

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #2 on: November 23, 2011, 04:56:21 am »
These are the rules I've specified (Just consider the one about rdp not ssh)






I want to connect to a machine (192...22) from my computer (on the same network as pfsense)by connecting to pfsense (@ 192.168.0.136) So I think I specified the rule as I want pfsense to do it but maybe I'm wrong
[EDIT] I missed to specify that when I try to connect to pfsense, I watched (tcpdump) that the pkts arrive at destination but don't reach 192....22

Sorry if I'm not very clear. Don't mind asking me for more details, I really need to do this right.
« Last Edit: November 23, 2011, 04:58:57 am by Fiona »

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #3 on: November 23, 2011, 05:00:22 am »
Try to disable wan side first rule, where it says "Block private networks"

Offline Fiona

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #4 on: November 23, 2011, 05:15:56 am »
Thank you very much!!
I think it worked
I'll try to make some more tests.
Thanks again!

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #5 on: November 23, 2011, 05:20:19 am »
Reason for disabling this rule is that this pfsense isn't on the edge/perimeter..
But if/when you want to make pfsense an perimeter firewall you should re-enable that rule.

Offline Fiona

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #6 on: November 23, 2011, 05:35:07 am »
Ok
but if I enable this rule How can I "enable" the rules I've specified?!

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #7 on: November 23, 2011, 05:50:55 am »
When you put pfsense directly connected to wan(no other nat's between) then you just setup wan so that you can connect to internet via pfsense and enable that "block private networks" rule and you should be fine

Offline mohanrao83

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #8 on: November 28, 2011, 08:06:25 am »
i also do same configuration. but still my nat with port forwarding not working kindly do any favor for its work..

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #9 on: November 28, 2011, 08:19:48 am »
i also do same configuration. but still my nat with port forwarding not working kindly do any favor for its work..

Please provide your rules and topology, so we can have something to work on

Offline mohanrao83

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #10 on: November 28, 2011, 08:52:58 am »
Sir, first i would like to thanking you for reply.

first need to aware i m using pfsense 2.0 services squid, squid guard, light squid.

then i need to access my windows ms sql server rdp 3389 from out side lan internet. like my home.

now i go to firewall option in port forwarding rule add (+) interface wan, source any port any, destination wan address port 3389, Redirect target IP 172.16.4.145, Redirect target port 3389, NAT reflection system default, Filter rule association add associated filter rule, then SAVE.
then...............! i will go to firewall rules go to wan interface i see its automatically created a rule TCP    *    *    172.16.4.145    3389 (MS RDP)    *    none         NAT   


now i telnet my pfsense from my home telnet 183.182.85.38 3389 it not working.

but when i ping this its replying and when telnet 183.182.85.38 22 its working.

sir now can please guide me what i do.... to its work.


Thanks

Mohan Rao

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #11 on: November 28, 2011, 11:57:40 am »
I don't know why telneting to ssh port works. But when you have port forward rule for RDP then windows host doesn't listen telnet on that port and thusfore it doesn't reply or work.
if you have msrdp port forward test it with mrdp client( win+r and type mstsc ).

Offline mohanrao83

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #12 on: November 28, 2011, 10:51:39 pm »
so now what i do to work it..
pls help

Offline Metu69salemi

  • Hero Member
  • *****
  • Posts: 1564
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #13 on: November 28, 2011, 11:32:49 pm »
if you have msrdp port forward test it with msrdp client( win+r and type mstsc ).

Try to connect your host with remote desktop client.

Offline mohanrao83

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: Activate NAT function on pfsense
« Reply #14 on: November 28, 2011, 11:55:29 pm »
i also try to connect from out side broadband internet connection start run mstsc and type my public ip its not connected.
is there any additional configuration for nat or port forwarding in pfsense server.