Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
08-18-2003, 08:48 AM
|
#1
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Rep:
|
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 ;)
|
|
|
08-18-2003, 08:53 AM
|
#2
|
Member
Registered: May 2002
Location: Argentina
Distribution: Mandrake 9.2
Posts: 177
Rep:
|
address
you can go to
masquerade site and there find help 
|
|
|
08-18-2003, 12:15 PM
|
#4
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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 
|
|
|
08-18-2003, 02:22 PM
|
#5
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
Yes, iptables must be started.
Type: service iptables start
I can't believe I forgot about that. 
|
|
|
08-18-2003, 02:48 PM
|
#6
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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?
|
|
|
08-18-2003, 03:20 PM
|
#7
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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.
|
|
|
08-18-2003, 03:27 PM
|
#8
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
my ISP's DNS servers? well, whats that?  i don't have much knowlegde of networking, sry 
|
|
|
08-18-2003, 03:43 PM
|
#9
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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.
|
|
|
08-18-2003, 03:48 PM
|
#10
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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 
|
|
|
08-18-2003, 04:54 PM
|
#11
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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?
|
|
|
08-18-2003, 05:15 PM
|
#12
|
Senior Member
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403
Rep:
|
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 05:17 PM.
|
|
|
08-18-2003, 05:43 PM
|
#13
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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
|
|
|
08-18-2003, 05:46 PM
|
#14
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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 05:47 PM.
|
|
|
08-18-2003, 05:57 PM
|
#15
|
Member
Registered: Nov 2002
Location: Austria
Distribution: Redhat 9
Posts: 140
Original Poster
Rep:
|
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 
|
|
|
All times are GMT -5. The time now is 05:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|