# quick way to setup ip maskaqting

## sweetangelhsd

what is a quick way to setup ip maskaqting?

i have two network cards setup and running

my stitic ip address for dsl is working it is on eth0

i would like eth1 to do the maskaqting 

i do belive i have it turn on in the kernel

next step would be??

----------

## delta407

 *sweetangelhsd wrote:*   

> what is a quick way to setup ip maskaqting?

 

Buy Windows 2000 and enable Internet Connection Sharing.  :Very Happy: 

----------

## sweetangelhsd

funny person

i have windows 2000server  95 98 98se me xp home and pro

don't want windozes i just need to figure out how to get this linux box to "share" the internet conction using ip masqute ideas?

----------

## delta407

Right. See the NAT HOWTO.

----------

## klieber

moving to networking and security.

--kurt

----------

## RebelYell

 *sweetangelhsd wrote:*   

> funny person
> 
> i have windows 2000server  95 98 98se me xp home and pro
> 
> don't want windozes i just need to figure out how to get this linux box to "share" the internet conction using ip masqute ideas?

 

Get the gShield firewall script from  Linuxmafia  . Make sure you have iptables support in your kernel and iptables 1.26a somewhere in your path (type iptables whithout any argument). 

Let's say your public IP (the one connected to the dsl) is on eth0.

Set the IP of eth1 with some private ip (eg 192.168.10.1)

Edit the gShield.conf file to suit your needs.

On the windoze box you must have 192.168.0.x IP's (from the same subnet as eth1).

I hope this helps, good luck!

Rebel Yell

----------

## rizzo

Yeah just make sure you have iptables installed and enabled in the kernel.  Then do a search on the internet for iptables scripts.  There are many, many websites where people post their favorite iptables scripts to do various things.

----------

## hamletmun

HOWTO  - Make your Internet Connection Sharing to work

From ISP to GENTOO - (eth0:DHCP or STATIC IP)

From GENTOO to WINDOWS - (eth1:192.168.0.1)

1.

insmod iptables_nat

2. 

echo 1 >/proc/sys/net/ipv4/ip_forward

3.

iptables -F 

iptables -t nat -F 

iptables -P INPUT ACCEPT 

iptables -P OUTPUT ACCEPT 

iptables -P FORWARD ACCEPT 

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

(if your linux uses eth0 to connect your isp)

4.

In the Windows Machine:

192.168.0.1 in the gateway

numbers from your /etc/resolv.conf in DNS server

----------

