SonicWall TZ 210: Access Public Server from within LAN and DMZ

Unlike most off-the-shelf routers, SonicWall firewalls do not automatically allow access of resources on the LAN or DMZ from within those firewalled networks, even though a reflexive NAT policy for mapping the WAN ports to the internal servers has been added. As a result, locally hosted public servers are accessible from the internet and can access the internet themselves, but they cannot be reached from computers on the local networks. This article describes how to setup a loop-back NAT policy that allows firewalled computers to access a server using the server’s public IP address or FQDN.

Solution

A NAT policy that maps the public WAN IP address to a server behind the SonicWall only covers connections that are being made from the WAN subnet. In order to allow computers on the LAN, DMZ or any other firewalled network to access this server, a loop-back NAT policy needs to be established that maps the WAN IP address to the server’s IP address if the source subnet is LAN or DMZ. This can be accomplished by performing the following steps:

  1. Login to the SonicWall management interface
  2. Navigate to Network → NAT Policies
  3. Click the Add button
  4. Create the following entry:
    • Original Source: Firewalled Subnets
    • Translated Source: WAN Interface IP
    • Original Translation: WAN Interface IP
    • Translated Translation: [Server IP Address Object]
    • Original Service: [Server Service Group]
    • Translated Service: Original
    • Inbound Interface: Any
    • Outbound Interface: Any

Leave the Create a reflexive policy unchecked. If not already done, you may have to create the proper objects for the server’s IP address and service group.

Related Resources

Implementing the abs() Function in Plain C or C++

This article describes how to calculate the absolute value of an integer without using any built-in functions in C or C++. The problem is based on an interview question that I used to ask candidates every once in a while, and it was not so much about coming up with an algorithm, but rather about understanding why the proposed algorithm works.

Read more

jQuery Plugin to Convert CSS Pixels to em, pt, percent and other Units

This article presents a small jQuery plugin to convert the dimensions of HTML objects to various CSS units, such as em and percent. The code is based on a popular implementation from the internet and fixes a subtle problem with the original conversion calcuation.

Read more

Blog Moved to headcrash.us

We moved the blog from blog.gerke-preussner.de to www.headcrash.us/blog over the weekend. A permanent redirect from old links is now in place. Please update your bookmarks and contact us in case of problems or missing content. Thank you!

Custom View Engine for Localized Views with ASP.NET MVC Razor

This article describes how to localize ASP.NET MVC page views and partial views by providing separate Razor templates for each language. Used in combination with localization through resource files and metadata, this approach leads to a cleaner project structure and allows for localizing a web page without having to recompile. However, it comes at the cost of some duplicated markup.

Read more

Disabling Client-side Caching in RavenDB

While editing documents in RavenDB Management Studio for testing, it became evident that the changes were not reflected in the website that was using the database. By default, RavenDB caches client queries. This article describes how to disable this feature, should the need arise.

Read more

Custom Display and Editor Templates with ASP.NET MVC 3 Razor

Much has been written on how to create custom templates for ASP.NET MVC 2 and earlier versions, as well as the default MVC view engine. Customizing the default templates in MVC 3 using the Razor view engine is just as easy, but not exactly obvious if one doesn’t know where to start. This article provides some quick example code for replacing the default custom templates for Object view models.

Read more

10 Command-Query Responsibility Segregation (CQRS) Examples in C#

Software architectures using Command-Query Responsibility Segregation and Event Sourcing combine a range of design patterns and ideas from Domain Driven Design. Although the individual concepts are relatively easy to grasp, understanding the entire architecture can be a daunting task, especially for developers who have limited or no experience with DDD and Enterprise Software Architecture. This article has a lists of 10 open source projects on the internet that provide good starting points.

Read more