LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2009, 08:00 AM   #1
jarias
LQ Newbie
 
Registered: May 2009
Posts: 12

Rep: Reputation: 0
NAT 32 to 1


Hi all,

Maybe someone can help me I'm trying to make a NAT
32 to 1 example

10.1.1.0/255.255.255.224 Nat to ip 209.213.xx.1 dev eth0
10.2.1.0/255.255.255.224 Nat to ip 209 213.xx.2 dev eth0:1

I'm trying with iptables
please advise

jorge
 
Old 08-19-2009, 05:22 PM   #2
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Code:
iptables -t nat -A POSTROUTING -o eth0 -s  10.1.1.0/29 -j SNAT --to-source 209.213.xx.1
iptables -t nat -A POSTROUTING -o eth0 -s  10.2.1.0/29 -j SNAT --to-source 209.213.xx.2
 
Old 08-20-2009, 09:55 AM   #3
jarias
LQ Newbie
 
Registered: May 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Up and running... with the SNAT

Thanks a lot...

Jorge
 
Old 08-20-2009, 10:33 AM   #4
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Oh, that should be a /27, not /29, by the way.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between NAT and NO NAT plisken Linux - Networking 1 01-10-2008 11:53 AM
I configure NAT and use "services ..." to save it but when I reboot there is no nat bruack Linux - Software 4 09-01-2004 02:38 AM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 05:50 AM
why NAT ? juanb Linux - Security 6 06-28-2004 09:56 PM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 04:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration