I'm a little confused about what exactly you are trying to do. Let me ask a few questions.
How many routers are you using, one or two? Is the on-board NIC wired or wireless? Is the on-board NIC connected to your broadband router? Is your main broadband router wired or wireless? Do you have a second wired or wireless network interface on the computer?
You only need one NAT/DHCP router. If you are just trying to convert a wired LAN to a wireless LAN then you can do that by bridging rather than doing routing with the computer.
For example, if your main broadband router is not wireless, but you want to add a wireless router as an access point for your neighbors do something like this.
(broadband)<--->WAN[WIRED-ROUTER]LAN<===>LAN[WIRELESS-ROUTER]WIFI...WIFI[Neighbor-PC]
With the above setup you want to disable DHCP on the wireless router and set the wireless router to an unused IP address (different from the wired router). You don't connect the WAN port on the wireless router. You should also reserve the wireless router's IP address in the wired router's DHCP static assignment table. Your neighbor's PC will get its IP address from the wired router via DHCP.
If you have a wireless router connected to your broadband then you don't need to add anything.
(broadband)<--->WAN[WIRELESS-ROUTER]WIFI...WIFI[Neighbor-PC]
If you don't have a wireless router, but you do have a wireless adapter in the computer then you can bridge the wired and wireless adapters in the computer.
(broadband)<--->WAN[WIRED-ROUTER]LAN<===>LAN[COMPUTER]WIFI...WIFI[Neighbor-PC]
The trick with the above configuration is that you have to connect using "ad-hoc" wifi mode on both computers. That allows two wireless clients to connect directly and doesn't use a wireless access point. Your neighbor's PC will get its IP address from the wired router via DHCP.
In Linux you have to set up a network bridge between the two interfaces.
Code:
#!/bin/sh
#
# /etc/rc.d/rc.bridge
#
# Script to set up Ethernet bridge
#
return=$rc_done
case "$1" in
start)
echo "Starting bridge br0" || return=$rc_failed
/sbin/modprobe tun || return=$rc_failed
dhcpcd -k -o eth0
ifconfig eth0 0.0.0.0 || return=$rc_failed
dhcpcd -k -o wlan0
ifconfig wlan0 0.0.0.0 || return=$rc_failed
brctl addbr br0 || return=$rc_failed
brctl addif br0 eth0 || return=$rc_failed
brctl addif br0 wlan0 || return=$rc_failed
ifconfig br0 up || return=$rc_failed
dhcpcd -t 30 br0 || return=$rc_failed
echo -e "$return"
;;
stop)
echo "Stopping bridge br0" || return=$rc_failed
dhcpcd -k -o br0
ifconfig br0 down
brctl delif br0 wlan0 || return=$rc_failed
brctl delif br0 eth0 || return=$rc_failed
brctl delbr br0 || return=$rc_failed
ifconfig eth0 up || return=$rc_failed
dhcpcd -t 30 eth0 || return=$rc_failed
echo -e "$return"
;;
status)
ifconfig br0
brctl show br0
;;
restart)
$0 stop && $0 start || return=$rc_failed
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
esac
test "$return" = "$rc_done" || exit 1
exit 0
Make sure that your kernel supports bridging and the tunneling driver.
I've never set up a NAT router on Linux, but that is done using "iptables". You only need to do that if you have absolutely no other router between your Linux computer and the Wide Area Network. For example, if your Linux computer is connected via a cable modem, DSL modem, dial-up or a cellular Internet service (with no router).
(broadband)<--->[MODEM]LAN<===>LAN[COMPUTER{NAT/DHCP/DNS}]WIFI...WIFI[Neighbor-PC]
In addition to NAT, you need a DHCP server on the wireless interface. You will probably want a DNS relay or DNS server on the wireless interface. You can do without a DHCP and DNS server if your neighbor manually configures their IP address, gateway and DNS server. The gateway has to be the Linux computer's WIFI IP address. The DNS server has to be the real WAN DNS server if you don't run one on the Linux computer.
The difference between a DNS proxy/relay and a DNS server is this. A DNS proxy/relay just forwards DNS requests to the real DNS server on the WAN. DNS proxy/relay does not allow names to be registered for computers on your LAN or WIFI. A DNS server also caches information, so it can speed up name resolution. Some relay/proxy software can do caching but it still does not support local name registration.
Often cable or DSL "modems" have built-in routers, and you don't need NAT on your Linux computer if the modem has a built-in router.
(broadband)<--->[MODEM/ROUTER]LAN<===>LAN[COMPUTER]WIFI...WIFI[Neighbor-PC]
- or -
(broadband)<--->[MODEM/ROUTER]LAN<===>LAN[WIRELESS-ROUTER]WIFI...WIFI[Neighbor-PC]
You can use your Linux computer as a second NAT router to keep your neighbors off your LAN.
(broadband)<--->WAN[WIRED-ROUTER]LAN<===>LAN[COMPUTER{NAT/DHCP/DNS}]WIFI...WIFI[Neighbor-PC]
The above setup has its problems. Any ports that need to be forwarded for your neighbors have to be forwarded through both NAT routers, on the computer and on the broadband router. By using bridging you avoid that problem and also allow your neighbors' computers to forward ports through the broadband router with UPnP.
So, to summarize if you have two routers, wired and wireless then you don't need to involve your PC at all. If you have one wired router, you can use your PC as a bridge between wired and wireless. If you have no routers at all then you need to do the NAT on the computer using "iptables".
EDIT NOTE: You will have to search for examples of how to connect ad-hoc using "wicd". It also appears that there may be a bug in some versions of "wicd" that makes ad-hoc connections difficult.