Date: Fri, 29 Mar 2002 15:25:47 +0100 From: Thomas Hanson <klon@nybro.dk> To: freebsd-questions@FreeBSD.ORG Subject: natd static mapping for outgoing translation Message-ID: <4D0E007A80ACD84F95688E6E9B981AE209406D@odin.pop.k-net.dk>
index | next in thread | raw e-mail
[-- Attachment #1 --] Hi I have set up a freebsd 4.3 with natd. We have 2 external ip numbers (one for the firewall/gateway, a.b.c.d , and one for our web/ftp server, e.f.g.h ) I am using a static mapping (e.f.g.h) for the webserver, and that works fine for traffic inwards. However when I use the webserver and go out to the internet, the world sees it as ip a.b.c.d, but I want them to see it as ip e.f.g.h. How do I do that? Here is part of my rc.conf : gateway_enable="YES" router_enable="YES" ifconfig_rl0="inet a.b.c.d netmask 255.255.255.248" ifconfig_rl0_alias0="inet e.f.g.h netmask 255.255.255.248" ifconfig_rl1="inet 192.168.1.1 netmask 255.255.255.0" firewall_enable="YES" firewall_type="simple" firewall_quiet="NO" natd_enable="YES" natd_interface="rl0" natd_flags="-u -m -dynamic -redirect_address 192.168.1.3 e.f.g.h" Thomas Hanson [-- Attachment #2 --] <html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 10"> <meta name=Originator content="Microsoft Word 10"> <link rel=File-List href="cid:filelist.xml@01C1D738.ECF51670"> <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:DoNotRelyOnCSS/> </o:OfficeDocumentSettings> </xml><![endif]--><!--[if gte mso 9]><xml> <w:WordDocument> <w:GrammarState>Clean</w:GrammarState> <w:DocumentKind>DocumentEmail</w:DocumentKind> <w:EnvelopeVis/> <w:Compatibility> <w:BreakWrappedTables/> <w:SnapToGridInCell/> <w:WrapTextWithPunct/> <w:UseAsianBreakRules/> </w:Compatibility> <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> </w:WordDocument> </xml><![endif]--> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline; text-underline:single;} span.EmailStyle17 {mso-style-type:personal-compose; mso-style-noshow:yes; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt; font-family:Arial; mso-ascii-font-family:Arial; mso-hansi-font-family:Arial; mso-bidi-font-family:Arial; color:windowtext;} span.GramE {mso-style-name:""; mso-gram-e:yes;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 10]> <style> /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm 5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman";} </style> <![endif]--> </head> <body lang=EN-US link=blue vlink=purple style='tab-interval:36.0pt'> <div class=Section1> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Hi<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I have set up a freebsd 4.3 with natd. We have 2 external ip numbers (one for the firewall/gateway, <span class=GramE>a.b.c.d ,</span> and one for our web/ftp server, e.f.g.h )<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>I am using a static mapping (e.f.g.h) for the webserver, and that works fine for traffic inwards. However when I use the webserver and go out to the internet, the world sees it as ip a.b.c.d, but I want them to see it as ip e.f.g.h. How do I do that? Here is part of my <span class=GramE>rc.conf :</span><o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>gateway_enable="YES"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>router_enable="YES"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>ifconfig_rl0="inet <span class=GramE>a.b.c.d<span style='mso-spacerun:yes'> </span>netmask</span> 255.255.255.248"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>ifconfig_rl0_alias0="inet <span class=GramE>e.f.g.h<span style='mso-spacerun:yes'> </span>netmask</span> 255.255.255.248"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>ifconfig_rl1="inet 192.168.1.1 netmask 255.255.255.0"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>firewall_enable="YES"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>firewall_type="simple"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>firewall_quiet="NO"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>natd_enable="YES"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>natd_interface="rl0"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>natd_flags="-u -m -dynamic -redirect_address 192.168.1.3 e.f.g.h"<o:p></o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt; font-family:Arial'>Thomas Hanson<o:p></o:p></span></font></p> </div> </body> </html>help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D0E007A80ACD84F95688E6E9B981AE209406D>
