LinuxQuestions.org
Review your favorite Linux distribution.
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 07-24-2010, 08:17 AM   #1
hgnoel1980
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Rep: Reputation: 15
dnsmasq - internet sharing


I am using dnsmasq to try and share my internet connection.

Network is as follows.

Internet --> Router -wlan0-> Debian Box (sprocket) -eth0-> net enabled blu-ray player (Sony S370)


Sprocket can connect to the internet via router over wireless and the S370 can connect to sprocket using dhcp from dnsmasq. However it is unable to connect to the internet. I have enabled ip forwarding, set some iptable rules and setup the blu-ray player to use sprocket as the dns server. I can ping the blu-ray player from sprocket so the connection is up however still no internet.

Any help would be greatly received.

Thanks

Harry

Last edited by hgnoel1980; 07-24-2010 at 08:21 AM.
 
Old 07-24-2010, 08:34 AM   #2
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
how's your iptables rules? and your dnsmasq config?
 
Old 07-24-2010, 08:44 AM   #3
hgnoel1980
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
iptables rules:

iptables -A FORWARD -i wlan0 -o eth0 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE

dnsmasq.conf:

only changes made to default config are specifying eth0 as interface and assign dhcp ranges.

Is this likely to be a dns problem?
 
Old 07-24-2010, 09:26 AM   #4
HasC
Member
 
Registered: Oct 2009
Location: South America - Paraguay
Distribution: Debian 5 - Slackware 13.1 - Arch - Some others linuxes/*BSDs through KVM and Xen
Posts: 329

Rep: Reputation: 55
Post your dnsmasq.conf file, comments stripped please.
oh, and I think its better to use -I instead of -A in your iptables rules. At least, while you're doing tests. later, you can integrate them in your firewall
 
Old 07-24-2010, 11:00 AM   #5
hgnoel1980
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Original Poster
Rep: Reputation: 15
dnsmasq.conf

#domain-needed
#bogus-priv
#filterwin2k
#resolv-file=
#strick-order
#no-resolv
#no-poll
#server=/localnet/192.168.0.1
#server=/3.168.192.in-addr.arpa/10.1.2.3
#local=/localnet/
#address=/doubleclick.net/127.0.0.1
#address=/www.thekelleys.org.uk/fe80::20s::60ff:fe36:f83
#user=
#group=
interface=eth0
#except-interface=
listen-address=127.0.0.1
#no-dhcp-interface=
#bind-interfaces
#no-hosts
#addn-hosts=/etc/banner_add_hosts
#expand-hosts
#domain=thekelleys.org.uk
dhcp-range=192.168.0.100,192.168.0.250,72h
#dhcp-range=red,192.168.0.50,192.168.0.150
#dhcp-host=11:22:33:44:55:66,192.168.0.60
#dhcp-host=11:22:33:44:55:66,fred
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
#dhcp-host=bert,192.168.0.70,infinite
#dhcp-host=id:01:02:02:04,192.168.0.60
#dhcp-host=id:marjorie,192.168.0.60
#dhcp-host=judge
#dhcp-host=11:22:33:44:55:66,ignore
#dhcp-host=11:22:33:44:55:66,id:*
#dhcp-host=11:22:33:44:55:66,net:red
#dhcp-host=11:22:33:*:*:*,net:red
#dhcp-ignore=#known
#dhcp-vendorclass=red,Linux
#dhcp-userclass=red,accounts
#dhcp-mac=red,00:60:8C:*:*:*
#read-ethers
#dhcp-option=3,1.2.3.4
#dhcp-option=option:router,1.2.3.4
#dhcp-option=3
#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5
#dhcp-option=42,0.0.0.0
#dhcp-option=40,welly
#dhcp-option=23,50
#dhcp-option=27,1
#dhcp-option=128,e4:45:74:68:00:00
#dhcp-option=129,NIC=eepro100
#dhcp-option = net:red, option:ntp-server, 192.168.1.1
#dhcp-option=19,0
#dhcp-option=44,0.0.0.0
#dhcp-option=45,0.0.0.0
#dhcp-option=46,8
#dhcp-option=47
#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com
#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8
#dhcp-option=vendor:PXEClient,1,0.0.0.0
#dhcp-option=vendor:MSFT,2,1i
#dhcp-option=vendor:Etherboot,60,"Etherboot"
#dhcp-option-force=208,f1:00:74:7e
#dhcp-option-force=209,configs/common
#dhcp-option-force=210,/tftpboot/pxelinux/files/
#dhcp-option-force=211,30i
#dhcp-boot=pxelinux.0
#dhcp-match#gpxe,175
#dhcp-boot=net:#gpxe,undionly.kpxe
#dhcp-boot=mybootimage
#enable-tftp
#tftp-root=/vat/tftp
#tftp-secure
#dhcp-boot=net:red,pxelinux.red-net
#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
#dhcp-lease-max=150
#dhcp-leasefile=/var/lib/misc/dnssmasq.leases
#dhcp-authoritative
#dhcp-script=/bin/echo
#cache-size=150
#no-negcache
#local-ttl=
#bogus-nxdomain=64.94.110.11
#alias=1.2.3.4,5.6.7.8
#alias=1.2.3.4,5.6.7.0,255.255.255.0
#mx-host=maildomain.com,servermachine.com,50
#mx-target=servermachine.com
#localmx
#selfmx
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
#domain=example.com
#srv-host=_ldap._tcp,ldapserver.example.com,389
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
#srv-host=_ldap._tcp.example.com
#ptr-record=_http._tcp.dns-sd-services
#log-queries
#log-dhcp
#conf-file=/etc/dnsmasq.more.conf
#conf-dir=/etc/dnsmasq.d
 
Old 07-26-2010, 02:42 AM   #6
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Rep: Reputation: 33
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 
  


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
Why does my network sharing work after I disable dnsmasq? mikedia Linux - Networking 4 03-20-2010 12:23 PM
bridge-utils / dnsmasq / iptables / debian => internet sharing problems cocchiararo Linux - Networking 5 09-17-2009 07:27 PM
dnsmasq and internet sharing johnh10000 Linux - Networking 0 05-23-2009 04:43 AM
mandrake 10.1 sharing files and internet sharing xfiles_arram Linux - Networking 0 05-21-2005 02:22 PM
dnsmasq setup for Internet via modem Crasherz Linux - Networking 1 09-28-2003 04:34 AM

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

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