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 11-20-2003, 02:46 PM   #1
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Rep: Reputation: 30
Question Basic networking IPTable Do I have to?? I canīt ping my machines


I am pretty new to networking. (I have never done it in windows) I have just got all the hardware togeather and have two computers with slackware 9.1 and a switch. I plugged it all togeather and the lights come on on the switch

I can ping both my machines on the loop back and on their respective IP addresses 192.168.1.1 and 192.168.1.2 I have the subnet mask set to 255.255.255.0 and the broadcast address set to 192.168.1.255

I canīt ping from one machine to another! I get a host unreachable error.

I have been reading up on here about the thingson here and even went to the likes of http://iptables-tutorial.frozentux.net/

I am guessing that the firewall that comes pre-setup when you install slackware 9.1 is blocking my attempts to ping my machines.

I need to change but I was wondering if there is some sort of a graphical interface to change the IPTable setup??

It seems really complicated, I only want to connect my two machines for now. Although later I will want to share my dial out internet access from my 192.168.1.1 to 192.168.1.2

Is there any easy way to do this???

Thanks
 
Old 11-20-2003, 03:08 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
How do the routing tables look like? The routing table is shown after you run the 'route' command.
 
Old 11-20-2003, 03:53 PM   #3
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
Do I just type route by its self?

Quote:
How do the routing tables look like? The routing table is shown after you run the 'route' command.
I will give it a go just typing route and see what it says... do I need to give any options or just type route?

Adam
 
Old 11-20-2003, 05:49 PM   #4
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Yes just type route and post the results. Also post the results of these commands.
ifconfig
iptables -L

That should help.

At the back of that tutorial you are reading is a script called iptables-flush. You could copy that into a file and make the file executable and then run the file and it should flush all iptables rules and set the default policies to ACCEPT. This is the state you need to be in to start troubleshooting networking problems.
 
Old 11-20-2003, 06:30 PM   #5
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
Ok thanks for the tips

These donīt look right do they???

This is the number two machine 192.168.0.1

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default worm.wehaveworm 0.0.0.0 UG 1 0 0 eth0

This is for my machine first machine 192.168.0.1 (Which will eventually share internet access)

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.0.1 0.0.0.0 UG 1 0 0 eth0

I will send the rest of the info from ifconfig and iptables -L tomorrow and also try that script.

Thanks ŋŋŋŋBin/Bash????
Adam
 
Old 11-20-2003, 08:05 PM   #6
pabloromero
LQ Newbie
 
Registered: Nov 2003
Location: Cordoba
Distribution: Red Hat 8
Posts: 24

Rep: Reputation: 15
Thumbs down You wont be able....

I HAVE THE SAME PROBLEM.

READ THE TOPIC : Attention Newbies: Basic Networking. I HAVE EXACTLY THE SAME PROBLEM.

If Linux come with a firewall preconfigured ...for a tiny LAN its an insult.

I CONSIDER THIS PROBLEM TERMINATED. I WAS WON.

YOU WILL NOT BE ABLE PING your machines.
Linux dont do that...

Stay at Windows.
 
Old 11-21-2003, 05:04 AM   #7
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
jimdaworm
The routing looks fine. The important thing is to disable any firewall rules which might be obstructing you.

pabloromero
It's not an insult to have a firewall, it's an option. And you installed it!
Quote:
YOU WILL NOT BE ABLE PING your machines.
Linux dont do that...

Stay at Windows.
Usually in RedHat you can do this:
service iptables stop
That will flush all iptables rules and set the default policies to ACCEPT.
 
Old 11-21-2003, 05:45 AM   #8
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
ŋCuanto tiempo llevas intentando pabloromero? Yo voy a hacerlo, no sé cuanto tiempo me cuestaria pero... ĄĄĄĄyo lo haré!!!

Adam
 
Old 11-21-2003, 11:25 AM   #9
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
Thanks for your help!

I donīt know if I was bored or what but I re-installed slack on both my machines and set everything up and compiled the kernal and only changed the processor type for both the computers and left all the other millions of things I donīt need (and some I probably do)

and appart from getting some sort of an error about wan unresolved symbols it went fine.

I did the iptables -L and it says: (It looks to me like everything is excepted)

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination



I can now ping my two computers (I even tried it from XP Pro to my second linux only box) and it worked.

I am now off to read about how I can actually do somthing with this connection like how I start to work out shareing internet and file sharing.

Thanks again
Adam
 
Old 11-22-2003, 10:48 PM   #10
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Glad to hear you got it working.

and appart from getting some sort of an error about wan unresolved symbols it went fine.
Most likely you don't need that WAN module. You can delete it and you won't get the unresolved symbols error any more.

I did the iptables -L and it says: (It looks to me like everything is excepted)

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

The above is OK for troubleshooting network problems, but you shouldn't surf the web like that. Since you are looking for something to do, I would suggest looking for a firewall. www.linuxguruz.com/iptables has a few pre-assembled scripts.
 
Old 11-23-2003, 07:45 AM   #11
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
Thanks

Thanks for the tips! That modules error was a bit annoying and I have had the same message with other modules I didnīt need a couple of other times, I didnīt know just deleting them would fix it! Thanks excellent!

Yeah I have been reading up a bit about these tables and stuff I feel like I have an reasonable understanding of them although donīt feel confident enought to attempt to write them myself! It sounds cool that you can set it up so that the computer only responds to connections that you inicate!

Thanks (Off to look at that link now!=

Adam
 
Old 11-23-2003, 01:36 PM   #12
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
Thanks for the tips! That modules error was a bit annoying and I have had the same message with other modules I didnīt need a couple of other times, I didnīt know just deleting them would fix it! Thanks excellent!

Well thats the "quick-n-dirty" method of fixing depmod errors. The proper way would be to reconfigure the kernel again and figure out what got left out. But it is a tempory fix.
 
Old 11-23-2003, 02:50 PM   #13
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
I thought the only thing I changed was the CPU

I guess there must have been a couple of other things I have no idea what!

Hey a quick question... I have been looking at these scripts but I donīt really know how to use them. I have read so may instructions and then there are IPTables and IPChains!!

I was looking thought that page and this script looks like what I suppose I need.

IPTABLES masquerading firewall http://www.linuxguruz.org/iptables/s...rewall_023.txt

I had a look thought it and though maby I need to change this part but I wasnīt exactly sure:


#-----Port-Forwarding Variables-----#

#For port-forwarding to an internal host, define a variable with the appropriate
#internal IP-Address here and take a look at the port-forwarding sections in the FORWARD +
#PREROUTING-chain:

#These are examples, uncomment to activate

#IP for forwarded Battlecom-traffic
#BATTLECOMIP="192.168.0.5"

#IP for forwarded HTTP-traffic
#HTTPIP="192.168.0.20"


I couldnīt figure it out so I just tried making it executable with chmod and running it but it gave me some errors that things it was looking for didnīt exist (when I get home I can give you the exact errors if it helps)

I hope I donīt sound like toooo much of an idiot!! I think I understand the basic principals of what I am trying to!

Thanks for ya time!
Adam

Last edited by jimdaworm; 11-23-2003 at 02:51 PM.
 
Old 11-24-2003, 06:12 PM   #14
/bin/bash
Senior Member
 
Registered: Jul 2003
Location: Indiana
Distribution: Mandrake Slackware-current QNX4.25
Posts: 1,802

Rep: Reputation: 47
I tried that one too and got alot of errors. In fact I have tried most of those scripts and I have determined the easiest one to configure and use is this one. Right out of the box you can run that script and depending on your setup you may need to change one or two variables, or maybe none. Plus the documentation Online is outstanding.

For Slackware you just put the script in /etc/rc.d/rc.firewall and make it executable, but I think you already know this.
 
Old 11-25-2003, 08:16 AM   #15
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 897

Original Poster
Rep: Reputation: 30
Thanks

Hey I am going to give that script ago I have been bashing my head against the wall re-compiling my kernal thinking that I was missing somthing! Maby I was I don't know.

I have just re-compiled my kernal from the original questions and only changed the CPU and no Fake Co-processor.

So I am off to try this script! I hope it works !

THanks
Adam
 
  


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
Basic IP and MAC spoofing Iptable rules? stjoan1 Linux - Security 3 11-13-2005 05:17 PM
Basic iptable help hamish Linux - Networking 13 08-04-2004 08:54 PM
Can't ping - iptable problem (possibly ICMP or OUTPUT) hamish Linux - Networking 3 04-21-2004 08:30 PM
Cannot ping between 2 machines on same router acampbell Linux - Wireless Networking 8 02-24-2004 03:27 AM
Ping between machines triplem Linux - Networking 1 04-14-2003 05:17 PM

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

All times are GMT -5. The time now is 04:40 PM.

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