> Source: [sk7303](https://support.checkpoint.com/results/sk/sk7303)

# sk7303 - Adding static host routes on Linux OS

| Property | Value |
|----------|-------|
| Solution ID | sk7303 |
| Date Created | 2001-09-06 |
| Last Modified | 2020-08-12 |
| Technical Level | General |
| Products | Other |
| Versions | Not Version-Specific |
| OS | Linux |

## Solution

**Important Note: This article is *not* applicable to Check Point operating systems - Gaia / SecurePlatform / IPSO. Refer to the relevant documentation for those operating systems.**

Refer to this manual page: [route](http://linux.die.net/man/8/route)

To add a static *host* route on Linux, run:   
**`route add -host <destination IP address> gw <gateway IP address>`**   
or   
**`route add <destination IP address> gw <gateway IP address>`**   

*Example*:

* Security gateway's external IP address is 192.168.1.1
* Security gateway's internal IP address is 10.1.1.1
* The desired Static NAT IP address is 192.168.1.20
* The internal host to be translated is 10.1.1.20

<br />

Use the following command:   

`route add -host 192.168.1.20 gw 10.1.1.20`  
or   
`route add 192.168.1.20 gw 10.1.1.20 `  

Alternately, the static routes can be entered in the `/etc/sysconfig/static-routes` file in this format:   

`eth1 net 192.168.1.20 netmask 255.255.255.255 gw 10.1.1.20`  

where *eth1* is the gateway's internal interface.

<br />

The `/etc/sysconfig/static-routes` file will be parsed by Linux kernel at startup.   

To verify that route was added successfully, check the routing table by running **`netstat -rn`**   

<br />

To add a static network route on Linux, refer to [sk2316](http://supportcontent.checkpoint.com/solutions?id=sk2316).

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
