• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

DNS-PROBLEM

I built up a small network (2 machines) at home (ethernet).
I installed a news-server, a mail-server, a www-server and a name-server at the one machine (m1), the second is only the client(m2). All works fine.

But now my question:
Somtimes i connect m1 over ppp to my provider.
Could sombody explain me, what i have to do, that it is possible for m2, to use internet.
I only used 192.168...., because it is only a test at this time. But how i could establish f.i. a www-server not only for my small net, but for internet.
0
Hawky
Asked:
Hawky
  • 2
  • 2
1 Solution
 
mcdoncCommented:
You need to check out IP masquerading.

Find information at http://www.salug.org/~wcb/text/IP-Masquerade.txt

0
 
coxCommented:
First, you need re-compile your kernel with the options describles in
http://www.indyramp.com/mirrors/ipmasq/ipmasq-HOWTO-3.html#ss3.1

then, you need setup IP-Masq. In your case, put this lines in your /etc/rc.d/rc.inet1(slackware).. or put this lines in console (root SUID).

# Proxy eth0 local network
/sbin/ifconfig eth0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0
# Proxy route
/sbin/route add -net 192.168.1.0 netmask 255.255.255.0 eth0
#ipfwadm routing...
/sbin/ipfwadm -F -a m -S 192.168.1.0/24 -D 0.0.0.0/0

Using this, the class C (192.168.1.*) will be forward to Internet. In your case, the machines m1 and m2...

Machine m2 needs use default gateway machine m1.
For example: M2
IP: 192.168.1.2
Netmask: 255.255.255.0
Gateway: 192.168.1.1 (M1 IP)

If you want to read de HOW-TO of masquerade --> http://www.indyramp.com/masq/

If you don't have ipfwadm in your system:
Ipfwadm 2.3 is available from ftp://ftp.xos.nl/pub/linux/ipfwadm/ipfwadm-2.3.tar.gz 

[]
cox
0
 
HawkyAuthor Commented:
First: Thanks for your help. Now it is possible for m2 to get connected to the internet.
But in my distribution (SuSE 5.3) i found only the line
/sbin/ifconfig eth0 192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0
in the rc.config. The two other lines i only put in at the prompt. In which files i have to put this lines in the correct way?
My own name server works correct, but what is with the name-server of my provider?
Is it not neccesary to put in this information into my system?

Thank you for your help
0
 
HawkyAuthor Commented:
Adjusted points to 230
0
 
coxCommented:
i can put all lines in same file, in slackware /etc/rc.d/rc.inet1, in Red Hat is other file..

put all lines in the file rc.config, no problem.. ;)

Using your own nameserver, it'll be able to resolve the address m1, for example.. i only see this diference... I prefer use my provider nameserver.. ;)

[]'s
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now