LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   configure a linux box to ADSL Speedstream Modem (https://www.linuxquestions.org/questions/linux-networking-3/configure-a-linux-box-to-adsl-speedstream-modem-93780/)

pacwarebrz 09-17-2003 09:51 AM

configure a linux box to ADSL Speedstream Modem
 
Hi !
My scenario is:
- ADSL modem Speedstream 5200 (only one port Ether plug on eth0)
- Linux BoX with Slack 9.0 with classical pentium 75Mhz, 24M Ram, 10 Gb Hdd and 2 3c509 etherlink III.

What a need to:
- Connect internal Lan to Internet with a firewall (and NAT, of course ... don't forget people .. I'm a newbie).
- I don't have any service on Linux Box (e.g. ftp server, www server ...). With port should I enable to my clients access e-mail (Argh !! Outlook) and web pages ?
I know ... it's a simple question ... but ...
I'm :newbie: Newbie !

Thanx !

nhs 09-18-2003 03:58 PM

I shall assume that the box which the ADSL modem is connected to can access the Internet fine.

First you must enable routing. This is done by adding or changing the line for net.ipv4.ip_forward to equal one in /etc/sysctl.conf.

Next edit /etc/iptables.conf to contain these lines:

-A INPUT -i lo -j ACCEPT
-A INPUT -i eth1 -j ACCEPT
-A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -j LOG
-A INPUT -j DROP
-A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
-t nat -A POSTROUTING -o eth0 -j MASQUERADE

This should set up a firewall which allows all outgoing connections and denies all incoming connections. It also masquerades any outgoing connections. The man pages for iptables contain detailed information on each of the commands used (and more).

P.S. I have assumed that eth0 is the ASDL modem and eth1 the home network. Swap these if they are the other way round.

pacwarebrz 09-18-2003 04:38 PM

Thanx !!
 
My doubt was in routing process ...
After testing many Howtos ... aparetly this solve my problem.
I'll testing and reply here !!

Thanx a lot !!

Linux 4all 4ever !!


All times are GMT -5. The time now is 03:35 AM.