This article shows the configuration to route the traffic on the SonicWall coming from a secondary router.
A router is connected to SonicWall X2 interface: the goal is to make all the networks that are behind that secondary router to be able to go to the internet through the SonicWall (HTTP/HTTPS/DNS).
We need to configure one static route on each firewall/router to achieve this.
On the router that doesn't have internet access you need to create a route that should look like this:
Source: Your network(s) to route to the internet. Destination: ANY Service: HTTP,HTTPS,DNS Gateway: The IP of the interface of the SonicWall firewall (the one that goes to the internet)
Now we need to configure the route on the SonicWall. Based on human logic we would expect to configure a route for all the traffic to be redirected to the outside. In fact we actually need to do the opposite: We need to set up a route to the networks itself, so the SonicWall knows how to go back to the networks behind the other router. The route on the SonicWall should look like this:
We are saying here, that any network that wants to reach the network(s) of the other router, have to go through the interface where the routers are connected to and use the other router's interface IP address as gateway for that traffic.
This way the other router will have internet access, since the traffic is going to be routed through the SonicWall.