Solved

NAT entire network

Posted on 2008-10-23
3
317 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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Do you have a windows based Checkpoint SmartCenter for centralized Checkpoint management?  Have you ever backed up the firewall policy residing on the SmartCenter?  If you have then you know the hassles of connecting to the server, doing an upgrade_…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

776 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