- my internet gateway for my local internet is redhat 7 (question fro a newbie)

- my internet gateway for my local internet is redhat 7 (question fro a newbie)

Post by Yann » Sun, 25 Aug 2002 22:32:05



Hi,

I have 2 comps:

* 1 redhat7.2
- eth0: linked to my ISP through dhcp
- eth1: linked to the local network (192.168.0.1)

* 1 Windows 98
- linked to the local network

I have configured the linux comp to allow IP Masquerading. i also
installed a DNS Server  (bind9-02). The linux box works perfectly on
the net.

My win98 can successfully ping IP Address on the internet, but NOT DNS
ADDRESSES !
(ex: i can ping 217.12.3.11 but not www.yahoo.com).

When connecting on a ftp server, i can authentify but can't get the
result for a 'ls' command.

I nneeeed heelp ! I am a newbie on linux and have followed the how-to
samples to configure the linux box.

Thanks for your help !

Please not mybox has no name, no domain name.

Here are some of my conf files:
***********************************************************************************************************************
/etc/named.conf:
options {
        directory "/var/named";

        // Uncommenting this might help if you have to go through a
        // firewall and things are not working out.  But you probably
        // need to talk to your firewall admin.

        // query-source port 53;

           forward first;
           forwarders {
                212.186.224.9;
                212.186.224.10;
            };

};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndc_key; };

};

key "rndc_key" {
        algorithm hmac-md5;
        secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";

};

zone "." {
        type hint;
        file "root.hints";

};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "pz/127.0.0";

};

*************************************
/etc/resolv.conf

# nameserver 212.186.224.9
# nameserver 212.186.224.10
nameserver 192.168.0.1

****************************************
/var/named/root.hinte

; <<>> DiG 9.2.0 <<>> @e.root-servers.net . ns
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39747
;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13

;; QUESTION SECTION:
;.                              IN      NS

;; ANSWER SECTION:
.                       518400  IN      NS      B.ROOT-SERVERS.NET.
.                       518400  IN      NS      J.ROOT-SERVERS.NET.
.                       518400  IN      NS      K.ROOT-SERVERS.NET.
.                       518400  IN      NS      L.ROOT-SERVERS.NET.
.                       518400  IN      NS      M.ROOT-SERVERS.NET.
.                       518400  IN      NS      I.ROOT-SERVERS.NET.
.                       518400  IN      NS      E.ROOT-SERVERS.NET.
.                       518400  IN      NS      D.ROOT-SERVERS.NET.
.                       518400  IN      NS      A.ROOT-SERVERS.NET.
.                       518400  IN      NS      H.ROOT-SERVERS.NET.
.                       518400  IN      NS      C.ROOT-SERVERS.NET.
.                       518400  IN      NS      G.ROOT-SERVERS.NET.
.                       518400  IN      NS      F.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
B.ROOT-SERVERS.NET.     3600000 IN      A       128.9.0.107
J.ROOT-SERVERS.NET.     3600000 IN      A       198.41.0.10
K.ROOT-SERVERS.NET.     3600000 IN      A       193.0.14.129
L.ROOT-SERVERS.NET.     3600000 IN      A       198.32.64.12
M.ROOT-SERVERS.NET.     3600000 IN      A       202.12.27.33
I.ROOT-SERVERS.NET.     3600000 IN      A       192.36.148.17
E.ROOT-SERVERS.NET.     3600000 IN      A       192.203.230.10
D.ROOT-SERVERS.NET.     3600000 IN      A       128.8.10.90
A.ROOT-SERVERS.NET.     3600000 IN      A       198.41.0.4
H.ROOT-SERVERS.NET.     3600000 IN      A       128.63.2.53
C.ROOT-SERVERS.NET.     3600000 IN      A       192.33.4.12
G.ROOT-SERVERS.NET.     3600000 IN      A       192.112.36.4
F.ROOT-SERVERS.NET.     3600000 IN      A       192.5.5.241

;; Query time: 227 msec
;; SERVER: 192.203.230.10#53(e.root-servers.net)
;; WHEN: Sat Aug 24 12:19:43 2002
;; MSG SIZE  rcvd: 436

****************************************
/var/named/pz/
$TTL 3D
@               IN      SOA     ns.linux.bogus.
hostmaster.linux.bogus. (
                                1       ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                4W      ; Expire
                                1D)     ; Minimum TTL
                        NS      ns.linux.bogus.
1                       PTR     localhost.

****************************************
Result of netstat -n -L

[root@localhost network-scripts]# ipchains -n -L
Chain input (policy ACCEPT):
target     prot opt     source                destination          
ports
ACCEPT     udp  ------  192.168.0.100        0.0.0.0/0             53
->   1025:65535
ACCEPT     udp  ------  192.168.0.1          0.0.0.0/0             53
->   1025:65535
ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   25
ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   80
ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   21
ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   22
ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   23
ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0            
67:68 ->   67:68
ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0            
67:68 ->   67:68
ACCEPT     all  ------  0.0.0.0/0            0.0.0.0/0             n/a
REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   0:1023
REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   2049
REJECT     udp  ------  0.0.0.0/0            0.0.0.0/0             *
->   0:1023
REJECT     udp  ------  0.0.0.0/0            0.0.0.0/0             *
->   2049
REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   6000:6009
REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
->   7100
ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
->   68
ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
->   68
ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
->   68
ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
->   68
Chain forward (policy DENY):
target     prot opt     source                destination          
ports
MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
Chain output (policy ACCEPT):

*******************************************
Result of netstat -nr
[root@localhost network-scripts]# netstat -nr
Table de routage IP du noyau
Destination     Passerelle      Genmask         Indic   MSS Fentre
irtt Iface
192.168.0.0     0.0.0.0         255.255.255.0   U        40 0        
0 eth1
213.245.250.0   0.0.0.0         255.255.254.0   U        40 0        
0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U        40 0        
0 lo
0.0.0.0         213.245.250.1   0.0.0.0         UG       40 0        
0 eth0

 
 
 

- my internet gateway for my local internet is redhat 7 (question fro a newbie)

Post by Yann » Wed, 28 Aug 2002 05:09:07


Finally, the problem was about my ipchains configuration: the UDP
packets were blocked  by a firewall rule ! :-(
breiz...@rocketmail.com (Yann R) wrote in message <news:73112a56.0208240532.17bfab09@posting.google.com>...
> Hi,

> I have 2 comps:

> * 1 redhat7.2
> - eth0: linked to my ISP through dhcp
> - eth1: linked to the local network (192.168.0.1)

> * 1 Windows 98
> - linked to the local network

> I have configured the linux comp to allow IP Masquerading. i also
> installed a DNS Server  (bind9-02). The linux box works perfectly on
> the net.

> My win98 can successfully ping IP Address on the internet, but NOT DNS
> ADDRESSES !
> (ex: i can ping 217.12.3.11 but not www.yahoo.com).

> When connecting on a ftp server, i can authentify but can't get the
> result for a 'ls' command.

> I nneeeed heelp ! I am a newbie on linux and have followed the how-to
> samples to configure the linux box.

> Thanks for your help !

> Please not mybox has no name, no domain name.

> Here are some of my conf files:
> ***********************************************************************************************************************
> /etc/named.conf:
> options {
>         directory "/var/named";

>         // Uncommenting this might help if you have to go through a
>         // firewall and things are not working out.  But you probably
>         // need to talk to your firewall admin.

>         // query-source port 53;

>            forward first;
>            forwarders {
>                 212.186.224.9;
>                 212.186.224.10;
>             };

> };

> controls {
>         inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
> };

> key "rndc_key" {
>         algorithm hmac-md5;
>         secret "c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
> };

> zone "." {
>         type hint;
>         file "root.hints";
> };

> zone "0.0.127.in-addr.arpa" {
>         type master;
>         file "pz/127.0.0";
> };

> *************************************
> /etc/resolv.conf

> # nameserver 212.186.224.9
> # nameserver 212.186.224.10
> nameserver 192.168.0.1

> ****************************************
> /var/named/root.hinte

> ; <<>> DiG 9.2.0 <<>> @e.root-servers.net . ns
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39747
> ;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13

> ;; QUESTION SECTION:
> ;.                         IN      NS

> ;; ANSWER SECTION:
> .                  518400  IN      NS      B.ROOT-SERVERS.NET.
> .                  518400  IN      NS      J.ROOT-SERVERS.NET.
> .                  518400  IN      NS      K.ROOT-SERVERS.NET.
> .                  518400  IN      NS      L.ROOT-SERVERS.NET.
> .                  518400  IN      NS      M.ROOT-SERVERS.NET.
> .                  518400  IN      NS      I.ROOT-SERVERS.NET.
> .                  518400  IN      NS      E.ROOT-SERVERS.NET.
> .                  518400  IN      NS      D.ROOT-SERVERS.NET.
> .                  518400  IN      NS      A.ROOT-SERVERS.NET.
> .                  518400  IN      NS      H.ROOT-SERVERS.NET.
> .                  518400  IN      NS      C.ROOT-SERVERS.NET.
> .                  518400  IN      NS      G.ROOT-SERVERS.NET.
> .                  518400  IN      NS      F.ROOT-SERVERS.NET.

> ;; ADDITIONAL SECTION:
> B.ROOT-SERVERS.NET.        3600000 IN      A       128.9.0.107
> J.ROOT-SERVERS.NET.        3600000 IN      A       198.41.0.10
> K.ROOT-SERVERS.NET.        3600000 IN      A       193.0.14.129
> L.ROOT-SERVERS.NET.        3600000 IN      A       198.32.64.12
> M.ROOT-SERVERS.NET.        3600000 IN      A       202.12.27.33
> I.ROOT-SERVERS.NET.        3600000 IN      A       192.36.148.17
> E.ROOT-SERVERS.NET.        3600000 IN      A       192.203.230.10
> D.ROOT-SERVERS.NET.        3600000 IN      A       128.8.10.90
> A.ROOT-SERVERS.NET.        3600000 IN      A       198.41.0.4
> H.ROOT-SERVERS.NET.        3600000 IN      A       128.63.2.53
> C.ROOT-SERVERS.NET.        3600000 IN      A       192.33.4.12
> G.ROOT-SERVERS.NET.        3600000 IN      A       192.112.36.4
> F.ROOT-SERVERS.NET.        3600000 IN      A       192.5.5.241

> ;; Query time: 227 msec
> ;; SERVER: 192.203.230.10#53(e.root-servers.net)
> ;; WHEN: Sat Aug 24 12:19:43 2002
> ;; MSG SIZE  rcvd: 436

> ****************************************
> /var/named/pz/
> $TTL 3D
> @               IN      SOA     ns.linux.bogus.
> hostmaster.linux.bogus. (
>                                 1       ; Serial
>                                 8H      ; Refresh
>                                 2H      ; Retry
>                                 4W      ; Expire
>                                 1D)     ; Minimum TTL
>                         NS      ns.linux.bogus.
> 1                       PTR     localhost.

> ****************************************
> Result of netstat -n -L

> [root@localhost network-scripts]# ipchains -n -L
> Chain input (policy ACCEPT):
> target     prot opt     source                destination          
> ports
> ACCEPT     udp  ------  192.168.0.100        0.0.0.0/0             53
> ->   1025:65535
> ACCEPT     udp  ------  192.168.0.1          0.0.0.0/0             53
> ->   1025:65535
> ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   25
> ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   80
> ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   21
> ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   22
> ACCEPT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   23
> ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0            
> 67:68 ->   67:68
> ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0            
> 67:68 ->   67:68
> ACCEPT     all  ------  0.0.0.0/0            0.0.0.0/0             n/a
> REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   0:1023
> REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   2049
> REJECT     udp  ------  0.0.0.0/0            0.0.0.0/0             *
> ->   0:1023
> REJECT     udp  ------  0.0.0.0/0            0.0.0.0/0             *
> ->   2049
> REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   6000:6009
> REJECT     tcp  -y----  0.0.0.0/0            0.0.0.0/0             *
> ->   7100
> ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
> ->   68
> ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
> ->   68
> ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
> ->   68
> ACCEPT     udp  ------  0.0.0.0/0            0.0.0.0/0             67
> ->   68
> Chain forward (policy DENY):
> target     prot opt     source                destination          
> ports
> MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
> MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
> MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
> MASQ       all  ------  192.168.0.0/24       0.0.0.0/0             n/a
> Chain output (policy ACCEPT):

> *******************************************
> Result of netstat -nr
> [root@localhost network-scripts]# netstat -nr
> Table de routage IP du noyau
> Destination     Passerelle      Genmask         Indic   MSS Fentre
> irtt Iface
> 192.168.0.0     0.0.0.0         255.255.255.0   U        40 0        
> 0 eth1
> 213.245.250.0   0.0.0.0         255.255.254.0   U        40 0        
> 0 eth0
> 127.0.0.0       0.0.0.0         255.0.0.0       U        40 0        
> 0 lo
> 0.0.0.0         213.245.250.1   0.0.0.0         UG       40 0        
> 0 eth0