LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-18-2003, 07:48 AM   #1
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Rep: Reputation: 15
masquerading


can someone tell me some masquerading script? and where to write it to? i wanna link a win2k pc over my redhat 9 pc, the win2k pc should only be able to get into the internet over mine computer,
pls help me you ;)
 
Old 08-18-2003, 07:53 AM   #2
nightjar
Member
 
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177

Rep: Reputation: 30
address

you can go to
masquerade site and there find help
 
Old 08-18-2003, 10:17 AM   #3
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
To setup masquerading in RedHat,
take a look at this post.
http://www.linuxquestions.org/questi...274#post424274
 
Old 08-18-2003, 11:15 AM   #4
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
thx mathieu, but, do it tables have to be stopped? because you don't start them again and it doesn't work for me right now
 
Old 08-18-2003, 01:22 PM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Yes, iptables must be started.
Type: service iptables start

I can't believe I forgot about that.
 
Old 08-18-2003, 01:48 PM   #6
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
ok, though of that well, it doesn't work if i start them too, hhm, on the win computer i only have to set the ip adress of my computer as default gateway right?
 
Old 08-18-2003, 02:20 PM   #7
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
On the windows PC, the default gateway is the IP of your Linux PC.
You also need to give the windows PC a unique IP address (for example: 192.168.1.2)
And you need to add the IP addresses of your ISP's DNS servers in the DNS tab.
 
Old 08-18-2003, 02:27 PM   #8
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
my ISP's DNS servers? well, whats that? i don't have much knowlegde of networking, sry
 
Old 08-18-2003, 02:43 PM   #9
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
You can find them by using the Network Configuration GUI.
In the menu, click System Settings and click on Network. The IP addresses are located under the DNS tab.

Or you can look in the /etc/resolv.conf file.


DNS servers are used to resolve domain names to ip addresses.
 
Old 08-18-2003, 02:48 PM   #10
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
aaah thx
so i put the dns adresses on the win computer to, my ip adress as gateway and it should work? well, i'll try it
 
Old 08-18-2003, 03:54 PM   #11
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
ok now i did all this things, but i couldn't find out if its working 'cause if i did all and restarted the computer i couldn't connect to the internet anymore (i have isdn, connecting through ippp0 to the internet), any idea?
 
Old 08-18-2003, 04:15 PM   #12
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
ISDN...
There is alot of ISDN in Europe.

Ok.
When you followed the steps in Post 3,
did you change eth0 to ippp0 and eth1 to eth0.

Can you post the contents of /etc/sysconfig/iptables
And the output of the following command: route -n


----
Edit

Can the two PCs ping each other ?
Use the ping command on Linux and on Win2k

Last edited by Mathieu; 08-18-2003 at 04:17 PM.
 
Old 08-18-2003, 04:43 PM   #13
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
well, i had to turn forwarding off and deleted the iptables, but i will do it again now:
my iptables:
# Generated by iptables-save v1.2.7a on Mon Aug 18 23:43:33 2003
*nat
:PREROUTING ACCEPT [1:48]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
[0:0] -A POSTROUTING -o ippp0 -j MASQUERADE
COMMIT
# Completed on Mon Aug 18 23:43:33 2003
# Generated by iptables-save v1.2.7a on Mon Aug 18 23:43:33 2003
*filter
:INPUT ACCEPT [110:17329]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [118:9340]
[0:0] -A FORWARD -i ippp0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -i eth0 -o ippp0 -j ACCEPT
COMMIT
# Completed on Mon Aug 18 23:43:33 2003

my rout -n output:
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
195.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 ippp0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 195.3.89.151 0.0.0.0 UG 0 0 0 ippp0

and no, i can't reach them with ping, not from linux zu win2k and the other way, thx for your help

and yes i changed eth0 with ippp0 and eth1 with eth0
 
Old 08-18-2003, 04:46 PM   #14
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
Destination// Gateway// Genmask// Flags// Metric// Ref// Use// Iface
192.168.0.0// 0.0.0.0// 255.255.255.0// U// 0// 0// 0// eth0
169.254.0.0// 0.0.0.0// 255.255.0.0// U// 0// 0// 0// eth0
195.0.0.0// 0.0.0.0// 255.0.0.0// U// 0// 0// 0// ippp0
127.0.0.0// 0.0.0.0// 255.0.0.0// U// 0// 0// 0// lo
0.0.0.0// 195.3.89.151// 0.0.0.0// UG// 0// 0// 0// ippp0

the // should be the spacebars ;)

Last edited by ichbinesderelch; 08-18-2003 at 04:47 PM.
 
Old 08-18-2003, 04:57 PM   #15
ichbinesderelch
Member
 
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140

Original Poster
Rep: Reputation: 15
ok i did a mistake i made an dns error by typing it into the other computer, well, i try to restart now, hopefully isdn works after that again, thx for all your help
 
  


Reply



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
IP Masquerading ? emailssent Linux - Networking 1 10-07-2004 10:49 PM
help ip masquerading campusloop Linux - Networking 1 05-20-2004 12:37 PM
IP masquerading. somebody help me! Johnsernickle Linux - Networking 4 10-22-2002 06:57 PM
IP Masquerading kwigibo Linux - Networking 3 09-21-2002 07:46 PM
ip masquerading artman62 Linux - Security 5 08-13-2002 07:57 PM

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

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

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