LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-08-2004, 01:16 AM   #1
hariiyer
Member
 
Registered: May 2004
Location: india
Posts: 103

Rep: Reputation: 15
how to configure ip masquerading


hi

My configuration is like this- RH-9 with 2 network cards. One is for internal and one is for internet. I am useing cable modem. My problem is that

1) how i will share my internet (ip masquerading and squid proxy).

please let me know asap

hari
 
Old 07-08-2004, 02:22 AM   #2
RINO2004
LQ Newbie
 
Registered: Jun 2004
Location: Lithuania
Distribution: Slackware 9.x
Posts: 21

Rep: Reputation: 15
http://monmotha.mplug.org/

here you can find a lot of information
 
Old 07-08-2004, 04:51 AM   #3
hasnain
Member
 
Registered: Jun 2004
Location: Karachi
Distribution: Redhat
Posts: 56

Rep: Reputation: 15
Ip masquerading

helloo


well wat i have understand is that u want to shareyour internet connection to more then one system on a single line...

command is as follows

[root@localhost root] ifconfig eth0:1 192.168.0.1 netmask 255.255.255.0 up


regards
 
Old 07-08-2004, 06:56 AM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Re: Ip masquerading

Quote:
Originally posted by hasnain

[root@localhost root] ifconfig eth0:1 192.168.0.1 netmask 255.255.255.0 up
That would be how to give a network adapter a second (virtual) IP address.


@hariiyer
To setup masquerading, as root enter into the commandline:

iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE

You'll also need to turn on port forwarding (echo "1" > /proc/sys/net/ipv4/ip_forward) and setup forwarding rules to allow traffic to pass between the two interfaces. Something like this should work:

iptables -A FORWARD -i ethY -o ethX -j ACCEPT
iptables -A FORWARD -i ethX -o ethY -m state --state ESTABLISHED,RELATED -j ACCEPT

Where ethX is your external interface (connected to internet) and ethY is the internal interface (connected to your internal LAN).
 
Old 07-16-2004, 10:45 AM   #5
kmashraf
Member
 
Registered: May 2001
Location: Madras, India
Distribution: Mandrake, Vector, Fedora, Slackware-Live, CentOS, Ubuntu, Kubuntu, PCLOS, Sabayon
Posts: 34

Rep: Reputation: 15
That's easy !

Just get hold of 'Firestarter' and install it. http://firestarter.sourceforge.net/
Couple of mouse clicks and voila, you have you have your Firewall and IP Masquerade up and running.
Another ways is get to http://projectfiles.com and get the firewall script from there and soon enough you'll have a Firewall and IP Masq up and running.
I can assure you no sweat at all.
But you wanna dirty your hands and write your own custom IP tables script with NAT (IP Masquerade) go right ahead. But first beef up on the IPTables HOWTO. Good starting point http://iptables-tutorial.frozentux.n...-tutorial.html
 
Old 07-16-2004, 10:53 AM   #6
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
If your just want to configure linux to act as a Internet gateway, get a hold of SmoothWall Express 2.0. (As you are in India, the CDs accompanying the current issue of PCQuest has SmoothWall Express 2.0).

The installation and configuration are a breeze.

Last edited by ppuru; 07-16-2004 at 10:54 AM.
 
  


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
IP Masquerading ? emailssent Linux - Networking 1 10-07-2004 10:49 PM
Masquerading sirdirki Linux - Networking 2 09-13-2004 12:20 PM
help ip masquerading campusloop Linux - Networking 1 05-20-2004 12:37 PM
IP Masquerading..... kwaka6 Linux - Networking 4 02-23-2003 05:59 AM
IP masquerading. somebody help me! Johnsernickle Linux - Networking 4 10-22-2002 06:57 PM

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

All times are GMT -5. The time now is 03:26 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