LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-02-2008, 09:27 AM   #1
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Rep: Reputation: 15
network without access to the Internet


Hi,

my home network:

Internet=> router(10.0.1.1) => | eth0 (10.0.1.2) eth1 (10.0.2.1)| => Mypc

I've tried to do this but It's useless...

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -i eth1 -s 10.0.2.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

How to solve this problem? Slackware 12.0
 
Old 04-02-2008, 09:42 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,214

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
Depending on the sub-net mask you are using, it may be all these addresses are on the same subnet. So the router won't route them.

What mask are you using? I" guessing you have eth0 and eht1 on the same system? Or not?
 
Old 04-02-2008, 09:46 AM   #3
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
I'm using 255.255.255.0 on each interface. Yes, interfaces are on the same system.
 
Old 04-02-2008, 09:57 AM   #4
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi bambeklis,

not enough information :
iptables -nvL please

ping from the linux router to router?
ping from the pc to linux router eth1 && eth0?
 
Old 04-02-2008, 10:12 AM   #5
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
Hi rossonieri#1,

root@erdos:~# iptables -nvL
Chain INPUT (policy ACCEPT 165 packets, 11636 bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- eth1 * 10.0.2.0/24 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 172 packets, 18544 bytes)
pkts bytes target prot opt in out source destination
root@erdos:~#

From linux router to router:

root@erdos:~# ping 10.0.1.1
PING 10.0.1.1 (10.0.1.1) 56(84) bytes of data.
64 bytes from 10.0.1.1: icmp_seq=1 ttl=64 time=0.324 ms
64 bytes from 10.0.1.1: icmp_seq=2 ttl=64 time=0.305 ms
64 bytes from 10.0.1.1: icmp_seq=3 ttl=64 time=0.294 ms

--- 10.0.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.294/0.307/0.324/0.023 ms
root@erdos:~#

From the PC to linux router eth1:

C:\Users\orion>ping 10.0.2.1

Pinging 10.0.2.1 with 32 bytes of data:
Reply from 10.0.2.1: bytes=32 time<1ms TTL=64
Reply from 10.0.2.1: bytes=32 time<1ms TTL=64
Reply from 10.0.2.1: bytes=32 time<1ms TTL=64
Reply from 10.0.2.1: bytes=32 time<1ms TTL=64

Ping statistics for 10.0.2.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\orion>

From the PC to linux router eth0:

C:\Users\orion>ping 10.0.1.4

Pinging 10.0.1.4 with 32 bytes of data:
Reply from 10.0.1.4: bytes=32 time<1ms TTL=64
Reply from 10.0.1.4: bytes=32 time<1ms TTL=64
Reply from 10.0.1.4: bytes=32 time<1ms TTL=64
Reply from 10.0.1.4: bytes=32 time<1ms TTL=64

Ping statistics for 10.0.1.4:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Users\orion>

Any suggestions?
Thanks

Last edited by bambeklis; 04-02-2008 at 10:13 AM.
 
Old 04-02-2008, 10:34 AM   #6
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi

looks good - but i forgot to ask you ping from pc to the router

well - if it looks good then the main problem should be dns.

HTH.
 
Old 04-02-2008, 10:40 AM   #7
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
It looks good, so what should I do with that main problem?
 
Old 04-02-2008, 11:09 AM   #8
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi

how do you connect to this forum exactly? do you have another internet connection or something?

just try open your browser && go surfing via your linux router - or - nslookup something.domain --> if it find the address then there should be no problem for you connect to the internet.

HTH.
 
Old 04-02-2008, 11:37 AM   #9
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
Hi

I'm connecting to this forum via router: mypc=>router(not linux router)=>internet

C:\Users\orion>nslookup www.linuxquestions.org
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 62.80.244.2

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

C:\Users\orion>

Looks like bad DNS server ?

Last edited by bambeklis; 04-02-2008 at 11:43 AM.
 
Old 04-02-2008, 11:52 AM   #10
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
Maybe my DHCP configuration on the linux router is incorrect ?

/etc/dhcpd.conf

ddns-updates on;
ddns-update-style ad-hoc;
option domain-name-servers 10.0.1.1;
option subnet-mask 255.255.255.0;
option routers 10.0.2.1;
# Local LAN
subnet 10.0.2.0 netmask 255.255.255.0 {
ddns-updates on;
range 10.0.2.3 10.0.2.150;
}

Look at the line "option domain-name-servers 10.0.1.1;" I've just changed the IP address of real DNS server to router's IP, but still can't connect to the net.

Last edited by bambeklis; 04-02-2008 at 11:54 AM.
 
Old 04-02-2008, 01:07 PM   #11
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
Any help please?
 
Old 04-03-2008, 08:40 AM   #12
bambeklis
Member
 
Registered: Aug 2005
Posts: 58

Original Poster
Rep: Reputation: 15
I need no help anymore, I've solved this problem. Thanks
 
Old 04-03-2008, 08:45 AM   #13
Troy Mac
LQ Newbie
 
Registered: Feb 2008
Posts: 1

Rep: Reputation: 0
It would have been nice if you put the resolution in the forum so others could know how to fix the problem... What was the answer?
 
Old 04-03-2008, 12:06 PM   #14
framp
Member
 
Registered: Apr 2003
Location: Next to Stuttgart, Germany
Distribution: Debian, Mint, Raspbian
Posts: 131
Blog Entries: 5

Rep: Reputation: 27
Quote:
Originally Posted by Troy Mac View Post
It would have been nice if you put the resolution in the forum so others could know how to fix the problem... What was the answer?
Totally agree with you!
 
  


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
vsftp - Can access FTP within office network BUT cant access via Internet! kokfei77 Red Hat 2 03-07-2012 07:24 PM
Debian Woody: Can't access internet through router, but can access network computers marales314 Linux - Networking 3 06-09-2006 12:33 PM
Connection to access point OK, but cannot access the network/internet Nymphetamine Linux - Wireless Networking 29 01-13-2005 02:59 PM
help on network and internet access new2itall Linux - Networking 5 10-29-2004 03:54 PM
I can't access the Internet through the network Alasis Linux - Networking 2 10-23-2002 01:52 AM

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

All times are GMT -5. The time now is 10:12 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