LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-28-2006, 11:08 AM   #1
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Rep: Reputation: 30
Internet sharing the hard way :( **SOLVED**


I've installed DAPPER SERVER here.
And on it I installed DNSMASQ which assigns the IP to a client computer.
But I would also like the client computer to have unrestrictet internet access. Meaning no PORTS are firewalled.
So I've install IPMASQ which took care of that problem. But latter found out that internet access was restricted. ANd thus I could not get HIGH ID in emule, and MSN Messenger wont connect to it,etc

So what must I do to get unrestricted InternetSharing??

ps. I also tried the following:
Code:
sudo /etc/init.d/ipmasq stop
sudo iptables -F -t nat
sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/16 -o ppp0 -j MASQUERADE
which I got from this site:
https://help.ubuntu.com/ubuntu/serve...iguration.html
But then the internetsharing didnt even work on the client computer.

Here's my ifconfig:
Code:
eth0      Link encap:Ethernet  HWaddr 00:08:A1:75:1C:87
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::208:a1ff:fe75:1c87/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4806 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3072 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:542416 (529.7 KiB)  TX bytes:2041535 (1.9 MiB)
          Interrupt:10 Base address:0xe400

eth1      Link encap:Ethernet  HWaddr 00:08:A1:0E:0A:F9
          inet6 addr: fe80::208:a1ff:fe0e:af9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13282 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13032 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10599183 (10.1 MiB)  TX bytes:1710600 (1.6 MiB)
          Interrupt:3 Base address:0xe800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:66 errors:0 dropped:0 overruns:0 frame:0
          TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4820 (4.7 KiB)  TX bytes:4820 (4.7 KiB)

ppp0      Link encap:Point-to-Point Protocol
          inet addr:193.77.18.232  P-t-P:213.250.19.90  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:12996 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12810 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:10275701 (9.7 MiB)  TX bytes:1421921 (1.3 MiB)

Last edited by Ashrack; 08-28-2006 at 04:29 PM.
 
Old 08-28-2006, 12:56 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
it's that last iptables line there that's right, but you also need to enable routing on your server: echo 1 > /proc/sys/net/ipv4/ip_forward. should work fine then. you also technically have the wrong mack on the iptables command, the source is clearly 192.168.0.24, not /16 but you don't need that -s optoin at all really.
 
Old 08-28-2006, 03:08 PM   #3
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
This is what I did:
Code:
root@server:~# echo 1 >/proc/sys/net/ipv4/ip_forward
root@server:~# sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
but it still wont work

Any other clues?
 
Old 08-28-2006, 03:31 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah, you tell us more about what's actually happening... how are you testing it? can you ping all machines involved? what are your routing tables? etc...

and if you're already root, why are you using sudo?
 
Old 08-28-2006, 04:01 PM   #5
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by acid_kewpie
can you ping all machines involved?
the client machine can always ping the server machine!
I test it that on client machine I ping my ISP' DNS number and try www.google.com in FF!

Quote:
what are your routing tables? etc...
umm, how do I do that, is it 'iptables-save' the command??

Quote:
and if you're already root, why are you using sudo?
am used to typing sudo for a lot of things so sometimes I write it for no reason

Last edited by Ashrack; 08-28-2006 at 04:14 PM.
 
Old 08-28-2006, 04:28 PM   #6
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
I've disabled IPV6, removed IPMASQ rebooted LINUX and then pasted this line into terminal:
Code:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
and the net started working on the client machine Tanx M8

Now another big questions is, how do I make this permenant, so I wont have to paste the same line everytime I reboot linux??
 
Old 08-28-2006, 04:42 PM   #7
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by Ashrack
I've disabled IPV6, removed IPMASQ rebooted LINUX and then pasted this line into terminal:
Code:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
and the net started working on the client machine Tanx M8

Now another big questions is, how do I make this permenant, so I wont have to paste the same line everytime I reboot linux??
Add it to one of your start-up scripts, like rc.local.
 
Old 08-28-2006, 04:43 PM   #8
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
I thought so too!
Well thx again!
 
Old 11-07-2006, 03:06 AM   #9
azhure
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
we have the same problem. i just want to know how do i disable IPV6 and remove ipmasq?

thanx.
 
Old 11-07-2006, 12:02 PM   #10
Ashrack
Member
 
Registered: Oct 2005
Distribution: Ubuntu - Edgy Eft
Posts: 173

Original Poster
Rep: Reputation: 30
On DEBIAN based DISTROS U just find the blacklist modules file and U add IPV6 to it and it wont get loaded! ATM am on Win so I do not know by hand where the file is located. But can latter tell U if U will be unable to find it.

As for IPMASQ
Just do
Code:
apt-get remove ipmasq
ofcourse on DEBIAN based distros only
 
Old 11-07-2006, 06:39 PM   #11
azhure
LQ Newbie
 
Registered: Nov 2006
Posts: 2

Rep: Reputation: 0
Question

i have tried that and still client PC can't access the internet...


i can ping the internet in the server and can also ping the client machine. the only problem is that internet connection is not shared in my local network.

by the way, i am using ubuntu server 6.06


thanx.
 
  


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
Internet Access & Internet Sharing Through Wi-Fi. Be.Gurmeet.Be Linux - Networking 0 04-13-2006 03:07 PM
mandrake 10.1 sharing files and internet sharing xfiles_arram Linux - Networking 0 05-21-2005 02:22 PM
Sharing external hard drive Micro420 Linux - Networking 3 02-24-2005 11:08 PM
Hard drive sharing with win 98? Olle Linux - Hardware 5 12-29-2003 10:00 AM
File sharing and internet sharing mullet Linux - Networking 1 10-14-2003 01:30 PM

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

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