Article View: comp.os.linux.redhat
Article #75Re: NAT suggestions
From: Mark Addinall
Date: Fri, 29 Nov 2002 22:05
Date: Fri, 29 Nov 2002 22:05
53 lines
2531 bytes
2531 bytes
Giles Harney wrote: > I did a search for NAT for linux and was swamped with all the results and > options. > > I would like to ask your suggestions on what to use for a NAT solution on > Redhat 8.0. > > Thanks, > -Giles > > ----------- #!/bin/bash # start NAT # requires iptables NOT ipchains. check kernel # is it there? die otherwise modprobe ip_tables # turn on the semaphore echo 1 > /proc/sys/net/ipv4/ip_forward # get rid of anything pending. this only really becomes # important if the comms stack or an application abends. iptables --flush iptables --table nat --flush iptables --delete-chain iptables --table nat --delete-chain # set up IP Masquerading # interface is still ppp. no DSL in the bush :-( iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE # set up IP Forwarding # Dave and co come in on eth0 iptables --append FORWARD --in-interface eth0 -j ACCEPT # now start to customise your table rules, or install # firewall. This will get you up and running quickly ---------------- Have fun, Mark Addinall.
Technical Details
Message-ID:
<3DE7E49C.3000802@iprimus.com.au>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!newsfeed-east.nntpserver.com!nntpserver.com!feed.cgocable.net!feed.tor.primus.ca!news.primus.ca!53ab2750!not-for-mailReferences:
<APKdnV0nmKhj2XugXTWcpQ@comcast.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107b38,a488ed9460f57e5b X-Google-Attributes: gid107b38,public X-Google-Thread: 102983,2fba46623ad3982b,start X-Google-Attributes: gid102983,public X-Google-ArrivalTime: 2002-11-29 14:05:06 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!newsfeed-east.nntpserver.com!nntpserver.com!feed.cgocable.net!feed.tor.primus.ca!news.primus.ca!53ab2750!not-for-mail Message-ID: <3DE7E49C.3000802@iprimus.com.au> From: Mark Addinall <maddinall@iprimus.com.au> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.os.linux.redhat,aus.computers.linux Subject: Re: NAT suggestions References: <APKdnV0nmKhj2XugXTWcpQ@comcast.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Original-NNTP-Posting-Host: 211.26.33.41 Organization: iPrimus Customer - reports relating to abuse should be sent to abuse@iprimus.com.au Lines: 56 X-Original-NNTP-Posting-Host: 127.0.0.1 Date: Sat, 30 Nov 2002 06:05:16 +0800 NNTP-Posting-Host: 203.134.67.67 X-Complaints-To: news@primus.ca X-Trace: news.primus.ca 1038607297 203.134.67.67 (Fri, 29 Nov 2002 17:01:37 EST) NNTP-Posting-Date: Fri, 29 Nov 2002 17:01:37 EST