Redhat 9 & iptable and adsl modem setup question

Redhat 9 & iptable and adsl modem setup question

Post by i ar » Wed, 29 Oct 2003 22:31:46



Hi There,

We have a Linux box (Redhat 9) that connects to adsl modem. Our
Windows clients
use linux as a gateway and router. I applied the following iptable
commands, now looks like everything works, but, I am,also, using linux
box as a web server, and we can't browse the site hosted on our linux
box thru our local network, where as any body from the net can browse.
I guess I am missing some extra commands to tell the linux box let the
local network clients get into web server.
Here is the network;

        (xx.xx.xx.xx)(our static ip)
        [ADSL modem]
        (192.168.1.1)
              |
              |
        (192.168.1.2)
        [Linux RH9]
        (192.168.0.xxx)---------------------------
                                                  |_  windows clients
                                                  |_  192.168.0.xxx
                                                  |_ ..

Here is the commands;

modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -i lo -j ACCEPT
/sbin/iptables -A INPUT -j LOG --log-level 4 --log-prefix "ATTACK"
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE

How can tell Linux to let local 192.168.0.xx network access linux RH9
web server
I guess when I enter our web site name like xxxxx.com,
name server gets xx.xx.xx.xx, our static ip, and local clients can't
access this ip.

I appreciate any help.
ismail

 
 
 

Redhat 9 & iptable and adsl modem setup question

Post by Fredr » Mon, 03 Nov 2003 11:17:13


Hi
I can access my web-server from my windows client.
(http://<web-server-name>/ or just <web-server-name>)
I don't really know the difference between mine and your setup, but I
have a few more lines in my firewall...

Do you forward request from internal port 80 to external port 80?

/Fredric


> Hi There,

> We have a Linux box (Redhat 9) that connects to adsl modem. Our
> Windows clients
> use linux as a gateway and router. I applied the following iptable
> commands, now looks like everything works, but, I am,also, using linux
> box as a web server, and we can't browse the site hosted on our linux
> box thru our local network, where as any body from the net can browse.
> I guess I am missing some extra commands to tell the linux box let the
> local network clients get into web server.
> Here is the network;

>         (xx.xx.xx.xx)(our static ip)
>         [ADSL modem]
>         (192.168.1.1)
>               |
>               |
>         (192.168.1.2)
>         [Linux RH9]
>         (192.168.0.xxx)---------------------------
>                                                   |_  windows clients
>                                                   |_  192.168.0.xxx
>                                                   |_ ..

> Here is the commands;

> modprobe iptable_nat
> echo 1 > /proc/sys/net/ipv4/ip_forward
> iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
> /sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
> /sbin/iptables -A INPUT -i lo -j ACCEPT
> /sbin/iptables -A INPUT -j LOG --log-level 4 --log-prefix "ATTACK"
> /sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE

> How can tell Linux to let local 192.168.0.xx network access linux RH9
> web server
> I guess when I enter our web site name like xxxxx.com,
> name server gets xx.xx.xx.xx, our static ip, and local clients can't
> access this ip.

> I appreciate any help.
> ismail


 
 
 

1. ppp && PPPoE && ADSL && net && buffer(s)

Hello!
i have a freebsd box (4.8-RELEASE) and a italian ADSL (256/128 if i remember good) line.
sometimes my freebsd box (that i use as firewall in my little lan) became stalled.
no data arrive and with ping IP i get error about some buffers full.
in ppp.log i see a lot of:
Jun 24 22:45:39 firewall ppp[66]: tun0: Phase: Clearing choked output queue

i search with google on newsgroups but i don't find nothing that work :)

i put some info on the configuration, because i read a lot of question about this parameters :)

kernel config:
maxusers        64
options         NMBCLUSTERS=32768       #expand nic buffer

in ppp.conf:
add default HISADDR

netstat -m:
1/400/131072 mbufs in use (current/peak/max):
        1 mbufs allocated to data
0/182/32768 mbuf clusters in use (current/peak/max)
464 Kbytes allocated to network (0% of mb_map in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines

netstat -t:
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.100.1      UGSc       15  8181837   tun0
localhost          localhost          UH         11   116358    lo0
192.168.0          link#1             UC          3        0    rl0
firewall           00:10:a7:06:7b:50  UHLW        3    31603    lo0
stefano            00:06:4f:01:08:86  UHLW       12 15328918    rl0    900
192.168.0.255      ff:ff:ff:ff:ff:ff  UHLWb       0     2635    rl0
192.168.100.1      hostXXX-172.pool62 UH         19        0   tun0

i hope that someone can help me :)

Regards,
        Stefano

--
Stefano Balocco
RIPE handle:    6BONE-SB27
Keyserver:      http://keyserver.linux.it ID:     8EF05AB2
Fingerprint:    DF65 A9E5 E307 D647 9E41 1CD1 9265 BF7D 8EF0 5AB2

2. AMANDA setup

3. RedHat: rc scripts & modem setup & Mitsumi CD

4. Blocking of ICMP echo packets

5. ADSL modem & Video card question

6. pptp

7. Problem on ADSL + IPtable

8. IBM PS/Valuepoint with S3 80c805 & Monitor NEC 5FGe: trouble with X

9. Linux Redhat 7.1 & Cable Modem & DHCP Server & Firewall

10. ADSL Modem Setup Problems???

11. Ameritech.Net ADSL Setup Up Using 5260 Modem

12. Help with serial set-up of SpeedRunner ADSL modem!

13. ADSL modem T1 How do you setup in corel linux