[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MASQUERADE



Hi


> Hi all,
>
> I still have a masquerade problem, and nothing helps me to go to the right
> way.
>
> This is my configuration :
>
> A server (10.0.0.1) with internet access on eth0, and local network access

why you don't assign an internet number on eth0 if your eth0 interfaces
is on the internet side ? 10.0.0.0 is a entire class A for internal network.
I think this may be a problem if you don't have
a router/gateways with another NAT active ... and NAT over NAT
can do a regular job ? never tryed ;-)

> (192.168.0.1) on eth1
> A workstation (192.168.0.14) wants to access to internet
>
> This is what I done :
>
> On the workstation, I specify the gateway and the dns as 192.168.0.1
> On the server, I ran the following code :
>
>            iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j
> MASQUERADE
>
> When I tried my configuration, the log said to me : 'bad port from
> 192.168.0.14'.
>
> Anyone can help me ?

i suppose that you have already compiled the kernel
with ip forward and masquerading support
#apt-get update
#atp-get install ipmasq
#cat >/etc/ipmasq/rules/A01interfaces.rul
EXTERNAL="eth0"
INTERNAL="eth1"
<ctrl>D

reboot or do /etc/init.d/ipmasq start

---
;---+---;
bye |
bye |hor



Reply to: