LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-23-2001, 06:15 PM   #1
RecoilUK
Member
 
Registered: Jul 2001
Location: Southampton, England
Distribution: Mandrake 8.2 , Slackware 8.1, $LFS
Posts: 270

Rep: Reputation: 30
Question IPTABLES Question


Hi guys

I,m trying to work out how to use IPTABLES to set up masquarading but i,m not quite sure what to do, I hope someone can help

I,ve been reading the NAT how-to which says the following...........

4.1 I just want masquerading! Help!

This is what most people want. If you have a dynamically allocated IP PPP dialup (if you don't know, this is you), you simply want to tell your box that all packets coming from your internal
network should be made to look like they are coming from the PPP dialup box.

# Load the NAT module (this pulls in all the others).
modprobe iptable_nat

# In the NAT table (-t nat), Append a rule (-A) after routing
# (POSTROUTING) for all packets going out ppp0 (-o ppp0) which says to
# MASQUERADE the connection (-j MASQUERADE).
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

# Turn on IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

Note that you are not doing any packet filtering here: for that, see the Packet Filtering HOWTO: `Mixing NAT and Packet Filtering'.


My question is where do I put the following to first test that it works and then to set it up at boot time, I also intend to set up a firewall of some kind, would I ammend the script i,m about to make with the above for this?

All I have done up to now is to install the IPTABLES rpm from the Mandrake disk.

Thx guys

RecoilUK
 
Old 09-24-2001, 12:21 AM   #2
mindsurfer
LQ Newbie
 
Registered: Sep 2001
Location: Canada
Posts: 8

Rep: Reputation: 0
Hi,

To test it create a script with those lines and just run it .
If you want it at the bootup add that script in the beginning of the /etc/rc.d/rc.local file.

If you have questions on how to create an extensive firewall you might want to check out http://netfilter.samba.org/unreliabl...WTO/index.html.

Good luck.
 
Old 09-24-2001, 06:27 PM   #3
krquinby
LQ Newbie
 
Registered: Sep 2001
Location: Portland, OR
Posts: 13

Rep: Reputation: 1
take a look at www.fwbuilder.org

This is a GUI to help you set up a firewall that uses IPTables. There is a wizard that will help you get started with the policy. There is an option to help you with masquerading as well.
 
  


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
iptables question iomari Linux - Security 4 01-13-2005 12:14 AM
Iptables Question? unixfreak Linux - Security 1 09-01-2004 08:23 PM
iptables Question gauge73 Linux - Networking 3 12-14-2003 12:02 AM
IPtables Question jacovds Linux - Security 10 11-17-2003 09:46 AM
iptables question Texicle Slackware 7 01-19-2003 12:48 AM

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

All times are GMT -5. The time now is 04:40 AM.

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