I have googled this to death, followed countless tutorials and not had any joy, so here goes:
I am trying to set up a router to provide internet access (among other things, just getting the internet to work for now) to a number of desktops and laptops.
I have followed a number of different tutorials, all of which seem to insist I need to:
- Set up a DHCP server
- Create firewall rules
- Some say I need to install ipmasq and dnsmasq
I have set up a working DHCP server.
/etc/dhcp3/dhcpd.conf
Code:
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
authoritative;
range 192.168.1.0 192.168.1.254;
option routers 192.168.1.1;
option domain-name-servers 192.168.2.1;
}
I have also set up the firewall rules:
/etc/iptables.up.rules
Code:
# Generated by iptables-save v1.3.8 on Wed May 7 15:48:06 2008
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o wlan0 -j MASQUERADE
COMMIT
# Completed on Wed May 7 15:48:06 2008
# Generated by iptables-save v1.3.8 on Wed May 7 15:48:06 2008
*mangle
:PREROUTING ACCEPT [102:15465]
:INPUT ACCEPT [99:15345]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [75:11388]
:POSTROUTING ACCEPT [83:12602]
COMMIT
# Completed on Wed May 7 15:48:06 2008
# Generated by iptables-save v1.3.8 on Wed May 7 15:48:06 2008
*filter
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
# Internal Network
-A INPUT -i eth0 -j ACCEPT
# Local Loopback
-A INPUT -i lo -j ACCEPT
# Existing connections
-A INPUT -m state -i wlan0 --state ESTABLISHED,RELATED -j ACCEPT
COMMIT
# Completed on Wed May 7 15:48:06 2008
The only line in that that does anything at the moment should be:
Code:
-A POSTROUTING -o wlan0 -j MASQUERADE
I have been using webmin to set these services up, so there should be no problem with the config files.
The problem:
The laptop I am using cannot connect to the internet
Connections:
Internet
-->
Virgin Cable Modem
-->
Belkin Wireless Router (basic config)
192.168.2.1
--> (Wireless)
192.168.2.2 (DHCP) (wlan0)
Ubuntu 8.04 Server
192.168.1.1 (eth0)
--> (Wired)
192.168.1.254 (DHCP) (eth0)
Laptop
The situation:- Server and laptop both running Ubuntu 8.04 fully updated
- Laptop can reach wireless router through server (192.168.2.1)
- Server can reach the internet
- Laptop cannot reach internet (no ping, or web browsing)
I currently do not have ipmasq or dnsmasq installed because when I do install them, the server can no longer browse the internet or the router.
Also, I have checked IP forwarding and it is enabled.
Hope this is enough information for someone to see what I'm doing wrong.
Thanks
Gary