LinuxQuestions.org
Visit Jeremy's Blog.
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 03-27-2012, 12:58 AM   #1
cilbuper
Member
 
Registered: Mar 2008
Posts: 141

Rep: Reputation: 0
Question Setting up an Ubuntu router/firewall/server with Webmin and EHCP


Ok, I am in the process of setting up a computer with Ubuntu 10.04 on it with Webmin and EHCP (Easy Hosting Control Panel). I want to set this machine up as a router and web server and make it my firewall as well. I am not going to be hosting anything very sensitive it is more of a testing platform more than anything.

So, I have Webmin installed as well as EHCP and everything is working pretty well. I only have one of the NIC's hooked to the network and it is set by default as DHCP.

I know for a router I need to set one of the NIC's to the inside LAN address. Currently I'm running a WRT54GL router and by default it is 192.168.1.1-254. I would like to set my internal IP on my Linux box to 192.168.1.1 as well but don't know if this is possible while it is still on the same network. Should I just set it to 192.168.2.1 and forget about it?

Now for setting up my WAN IP address, I don't know what to do here. My ISP is Windstream and they gave me a speedstream 4200 which uses 192.168.254.254 as the default IP address, and I think it is in bridged mode so it forwards all external requests to the router.

So now I need to know what I need to set my LAN and WAN NIC to. Do either of these get set to DHCP? I think the linksys WAN connection is set to DHCP so should I set my WAN eth0 NIC to DHCP as well?

So what should I set my internal eth1 NIC to? I would like it to be static and I guess I'll start a 192.168.2.x network.
iface eth0 inet static
address 192.168.2.1
network 192.168.2.0
netmask 255.255.255.0
broadcast 192.168.2.255
????? gateway 192.168.2.1 - or should this be the eth0 adapter?

or

address 192.168.2.1
netmask 255.255.255.0
gateway 192.168.2.1 or should it be the IP of the eth0 adapter and how do I find that if it is set to DHCP?

If the gateway needs to be set to a fixed IP, I know that my Linksys router, being set to DHCP has picked up a 192.168.254.1 IP address, so I could change the eth0 NIC to static and make it the same IP as teh Linksys router has picked up on DHCP.

Now since I am taking the Linksys out as the gateway, I guess this Linux router will have to act as the DNS server so should I install BIND DNS SERVER?
 
Old 03-28-2012, 03:11 AM   #2
nikmit
Member
 
Registered: May 2011
Location: Nottingham, UK
Distribution: Debian
Posts: 178

Rep: Reputation: 34
In most cases the ISP will provide a DHCP address to your WAN interface, and settings for DNS servers and default gateway with it. You don't need to install Bind, and even if you did you will still need to set the forwarding DNS servers on Bind itself. If you don't know what the DNS servers for your provider are you can always use a free public DNS server.

Set your external interface to DHCP, and see if you need to configure the MAC address on it to match the MAC of your current router. Some ISPs lock the connection to one MAC. If you have a static IP from the ISP manually configuring it might work as well.

On the inside you can do more or less whatever you want - pick a subnet and set up DHCP.

Then you need to enable ip_forwarding 'echo 1 > /proc/sys/net/ipv4/ip_forward' and configure NAT (and your firewall?) in iptables.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Setting Up Ubuntu Webmin Server MadHatter21 Linux - Newbie 11 11-03-2011 05:06 PM
LXer: Setting Up an Open Source Server, Firewall and Router on Endian, Part 1 LXer Syndicated Linux News 0 10-23-2010 04:00 AM
Ubuntu 8.04 as a router & Firewall, setting up ssh to access from other os/pc Cougar9000 Linux - Networking 1 07-06-2008 06:12 AM
setting up sendmail on DMZed fedora server behind router/firewall kideyse Linux - Server 0 05-20-2008 12:00 PM
setting up a firewall behind a router mattmc97 Linux - Security 3 05-05-2004 04:36 PM

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

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