1 static pubblic ip address to 1 lan IP NAT (www.myip.com show wan ip!)
-
hi, i have a internet connection with 32 ip static subnet (29 availables), for example 32.15.12.14/27, the gateway ip (wan) is 32.15.12.15 i need to mapping 1 ip private for example 192.168.100.10/24 with an external static ip address for example 32.15.2.16 i need that the pc laptop with the 192.168.100.10 lan ip address exit and show in in www.myip.com the address 32.15.2.16 BUT AFTER 200 TEST WITH OUTBOUND NAT, 1:1 EXC ALWAYS SHOW THE WAN IN, ( ip wan) is 32.15.12.15!
some one can help me please?
i reserve a virtual ip and try to do NAT config but not work, i need that this laptop exit (and accept incoming connection) like nat1:1 same as piut the static pubblic ip address ( and related gw) on the ethernet direcly !
please help me! -
@vitozzo said in 1 static pubblic ip address to 1 lan IP NAT (www.myip.com show wan ip!):
the gateway ip (wan) is 32.15.12.15
EXC ALWAYS SHOW THE WAN IN, ( ip wan) is 32.15.12.15!Now, is this the gateway IP or the WAN IP?
Outbound NAT 1:1 is the correct way to do this.
Select WAN interface, state the external public IP and the internal with a /32 mask.
Remember, that the NAT doesn't permit any traffic. You need to add WAN rules additionally for allowing access to the internal device. -
@viragomann
I THANKS FOR REPLY! the test computer (192.168.100.10) go on internet, but the ip related with myip.com is the pfsense wan ip, (the gateway ip (wan) is 32.15.12.15) i need to exit on myip.com with the send ip ( virtual ip?) 32.15.12.16.
can you send me some config? thank a lot! -
@vitozzo said in 1 static pubblic ip address to 1 lan IP NAT (www.myip.com show wan ip!):
but the ip related with myip.com is the pfsense wan ip, (the gateway ip (wan) is 32.15.12.15)
32.15.12.15 could be the WAN IP or the WAN gateway IP but not both at the same time.
So my question was, which one is it?And yes, you have to add the additional public IP as virtual to WAN.
Firewall > Virtual IPs
Add a new one of type "IP Alias", select WAN interface and enter the IP and the /29 mask. -
the router from internet provider have this address 32.15.12.14 , pfsense wan have the address 32.15.12.15, sorry for missundestending..
the problem is that i have create a virtual ip, but not work, can you send me an example screenshot or a procedure?
i have configured the virtual uip ( why with /29?? subnet is /27 and single ip is /32.. why 27?) -
@vitozzo
Yes, you need a /27 mask. My fault.I don't use NAT 1:1 on my own, so I cannot provide a screen. But it's all well documented in the docs: https://docs.netgate.com/pfsense/en/latest/nat/1-1.html
-
@viragomann
i have use it for configuration! but not work
if you cannot you know someone that can help me? i can pay! -
@vitozzo
OR MAYBE THE WAY FOR HAVE ONE PUBBLIC STATIC IP ADDRESS TO ONE HOS ( INSIDE THE LAN, MAYBE WITH STATIC ROUTE)? -
@vitozzo
It's quite simple. Post you 1:1 rule please.For troubleshooting use Diagnostic > Packet Capture.
Sniff the traffic on WAN. Check out the IPs of www.myip.com and enter them in the Host box (multiple separated by "|").
Start the capture and try to access www.myip.com from the internal device.
You should see the packets going out with the source IP you stated at external in the 1:1 NAT rule.