Solved

NAT entire network

Posted on 2008-10-23
3
315 Views
Last Modified: 2013-12-16
Local network = 172.20.1.0/24
Needs to NAT to = 192.168.76.0\24
Example 172.20.1.15 needs to be nat'd to 192.168.76.15.

I'm just curious what config file I need to use in Shorewall to accomplish this and how it would look.  Thanks in advance for your help.
0
Comment
Question by:MainStaySolutions
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
larsga earned 500 total points
ID: 22790328
Might the following be of help?
http://www.shorewall.net/NAT.htm

That article is a bit old, but if current shorewall behaves the same, it would be something like:

/etc/shorewall/nat

#EXTERNAL       INTERFACE         INTERNAL      ALL INTERFACES     LOCAL
192.168.17.1     eth0                172.20.1.1          no                    no
192.168.17.2     eth0                172.20.1.2          no                    no
192.168.17.3     eth0                172.20.1.3          no                    no

Repeat for all addresses needing 1:1 nat.
0
 

Author Comment

by:MainStaySolutions
ID: 22790402
I was trying to sway away from nat'ing  individual addresses, and did find a fix for it.  I put this in my /etc/shorewall/masq file and it seems to have worked, but I still have some testing to do.  Thanks for your response.

#INTERFACE              SUBNET          ADDRESS         PROTO   PORT(S) IPSEC
eth4    eth1
eth2:!192.168.76.0/24   eth1
#LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
0
 

Author Closing Comment

by:MainStaySolutions
ID: 31509368
Thanks for your quick response.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AWS EC2 Linux 1 55
Issue with SFTP on non-root account using Guacamole  / GUAC 2 67
networking details on centos 6.6 4 53
Steps to follow for Maintenance of Servers 4 54
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now