Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have one Linux desktop with two NICs, a wireless router, and internet access.

The Linux box's eth0 is set to connect to the internet. Its IP address is assigned by the ISP, via DHCP.

Eth1 is connected to my router, a Linksys E1000. Eth1's IP address is 192.168.1.12, and the router's IP address is 192.168.1.1.

I need all devices that connect to the router to access the internet, but I don't know how to configure the router and eth1. I'm lacking in network knowledge, and I don't know how to bridge between the two NICs so both can share internet access.

FYI, The desktop is using Ubuntu 10.04. DNS service is installed on the desktop; I'm using BIND 9. For DHCP server, it is built in on the router side.

I tested this setup using my laptop. Connected to the router, I can open web apps on the desktop at 192.168.1.12, but cannot connect to the internet.

Some might suggest that I should connect the internet connection and everything else to the router. That way is easy, but I want full control over all internet access. Next I want to learn to set up a captive portal.

How should I configure eth0, eth1 and the router so it can share the internet connection? And are there any another tools that need to be installed?

share|improve this question
add comment

1 Answer 1

You should set your E1000 to bridge mode, so it just acts as your wireless access point (AP), not a router. Turn off NAT and turn off the DHCP service on your E1000. Configure it to get its IP address via DHCP from your Linux box.

Then configure your Linux box to be a NAT gateway, and to also be the DHCP server for your network. You can still use the 192.168.1.x/24 subnet, and following convention you'd make your Linux box's eth1 be 192.168.1.1.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.