No internet connection with IP Public as WAN

Started by Juicestyle, September 25, 2024, 11:54:08 AM

Previous topic - Next topic
September 25, 2024, 11:54:08 AM Last Edit: September 25, 2024, 11:55:44 AM by Juicestyle
Hello,

I'm trying to configure my WAN interface with a public IP address.
I've successfully configured my public IP on my WAN interface and set up my gateway.


However, when I connect to the LAN, I can't get out.

Do I need to configure SNAT?

Have a gode day

Yes you need Outbound NAT.

When you have automatic or Hybrid NAT rules following is the behavior:

A. When you use DHCP on your WAN, those NAT rules are created automatically.
B. When you set a Static IP on your WAN, but dont specify a GW on the Interface the NAT is not automatically created
C. When you set Static IP on your WAN, and specify GW on the Interface the NAT is automatically created.

https://docs.opnsense.org/manual/interfaces.html#assignments

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD


From that picture, you already had auto rules created for all your LAN interfaces. So NATing should work from LAN > WAN. You dont need a manual NAT rule in this case and also the one you created is missconfigured.

Try to do some further checks from a LAN device like:

nslookup google.com
ping google.com
tracert google.com - Windows device
traceroute google.com - Linux device

Also how are your Rules set on the LAN e.g network from which is not working for you?

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD

Ping to google.fr:
Error during name resolution

Ping 9.9.9.9:
PING 9.9.9.9 (9.9.9.9) 56(84) bytes of data.

--- 9.9.9.9 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2072ms