LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-23-2004, 08:31 PM   #1
smadim2
LQ Newbie
 
Registered: Jun 2004
Posts: 1

Rep: Reputation: 0
Internet Connection Sharing Mandrake 10.0


hi;

i have just installed mandrake 10.0 on a linux box that is use as gateway to the internet. This box used to have mandrake 8.2 and it was working like a champ.
My LAN involves the following ITEM:
1- Machine A - A MDK 10 box with to 2 NICs (drivers working fine)
2- A Hub
3- Machine B with a single NIC (driver working fine)

Machine A has access to the internet via NIC 1 which is assigned a public IP address 62.X.X.X and i have the internet up and running on this machine.
The other NIC on macine A is connected to the hub and is assigned the address 192.168.1.1 (but the DNS server is the same public one that is associated with the other NIC)

Machine B is connected to the hub as well via an ethernet cable

Now I am trying to share my internet connection on machine A. Once I finish configuring and try to apply the changes i get teh following error message:


Stopping named: [ OK ]
Error: Undefined Client Zone in rule "REDIRECT masq 3128 tcp www -"
Error: Undefined Client Zone in rule "REDIRECT masq 3128 tcp www -"

I know that dhcpd server is working since MACHINE B get an IP address. As a matter of fact i assigned MACHINE B a fixed address through /etc/dhcpd.conf that is on machine A. However I could only ping machine A after I enabled the pinging server from the securiy icon on machine A.

I tried to do the following:
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -m state --state NEW -j ACCEPT
iptables -P FORWARD REJECT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

but still not working. Actually after doing
iptables -P FORWARD REJECT
I get the following error:
iptables: Bad policy name

I have tried everything that i could and it is still not working.

I have squid installed if that matters.

Any help will be appreciated

moe smadi
research engineer
 
Old 06-23-2004, 11:18 PM   #2
spoody_goon
Member
 
Registered: Sep 2003
Location: Michigan USA
Distribution: Mandrake, DamnSmallLinux, VectorLinux
Posts: 416

Rep: Reputation: 30
Ok this may seem like a Windoz answer but did you try the wizard located under "Configure your computer"? I used it for a similar set up and it worked really well.
 
Old 06-24-2004, 02:06 AM   #3
ipvl
LQ Newbie
 
Registered: Jun 2004
Location: Tomsk, Russia
Distribution: ASP Linux 9.0, RedHat 9.0, FreeBSD 4.8-
Posts: 16

Rep: Reputation: 0
Server WITHOUT squid under RedHat 9.0

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

IPV4_FORWARD=yes to /etc/sysconfig/network

add to /etc/sysconfig/iptables:

*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
[0:0] -A POSTROUTING -p tcp -m tcp -o name_of_external_interface ppp0 -j MASQUERADE
COMMIT

set default gateway to ip address of internal interface on server box

if server run dhcp service and local dynamic dns (isc-dhcp and bind)
you need something like:

(my dhcpd.conf)

authoritative;
ddns-update-style interim;
ddns-updates on;
default-lease-time 21600;
max-lease-time 43200;

key DHCP_UPDATER {
algorithm hmac-md5;
secret "hEzY5R2sC+wJkoMli2xRUQ==";
};

zone mem.net. {
primary 127.0.0.1;
key DHCP_UPDATER;
}

zone 0.168.192.in-addr.arpa. {
primary 127.0.0.1;
key DHCP_UPDATER;
}

subnet 192.168.0.0 netmask 255.255.255.0 {
option ntp-servers 195.208.161.89;
range 192.168.0.10 192.168.0.100;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1;
option domain-name "mem.net";
option subnet-mask 255.255.255.0;
option netbios-name-servers monument.mem.net;
host monument {
fixed-address 192.168.0.1;
}
}

You may contact me via ICQ
 
Old 06-24-2004, 02:12 AM   #4
ipvl
LQ Newbie
 
Registered: Jun 2004
Location: Tomsk, Russia
Distribution: ASP Linux 9.0, RedHat 9.0, FreeBSD 4.8-
Posts: 16

Rep: Reputation: 0
Quote:
Originally posted by ipvl

[0:0] -A POSTROUTING -p tcp -m tcp -o name_of_external_interface ppp0 -j MASQUERADE
COMMIT
correction - remove ppp0 from above string
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mandrake 9.0 and internet connection sharing tronchaser Linux - Hardware 0 02-26-2004 08:48 AM
Internet connection sharing using Mandrake 9.2 doctorwebbox Linux - Networking 0 02-04-2004 04:06 PM
Mandrake Internet Connection Sharing! MStegm3012 Linux - Networking 1 01-08-2004 05:49 AM
Mandrake 8.2 Internet Connection Sharing opera_sys Linux - Networking 1 10-13-2002 02:48 AM
Mandrake 8 Internet Connection Sharing advantis Linux - Networking 0 06-26-2001 10:13 PM

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

All times are GMT -5. The time now is 06:02 PM.

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