Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How to install a Linux router?


    Hi all,

    Connection
    FTTH (500mbps) -> ONT (4 ports) -> 2 PCs-Virtual Machine
    (Dynamic IP)

    ONT-Huawei HG8045

    Oracle VirtualBox
    Host Ubuntu 14.04 desktop
    VMs Ubuntu 14.04 desktop/Ubuntu 14.04 server/Windows 10 etc.
    (PC-4/8 cores, RAM-8/32G, HDD-SSD 1TB, about 20 VMs running on each Virtual Machine)

    ONT assigned IP - 192.168.8.2/3/4/5 etc.

    Instead of connecting a hardware router to the network, I'm considering building a Linux router on a VM running Ubuntu 14.04 desktop/server.

    Please advise which software shall I use pfsense/Quagga any others?

    Thanks

    Regards
    satimis

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,038
    Get a hardware router that can also act as a firewall. They are cheap these days and avoids the need to deal with all the security cruft you would have to attend to on the router VM you mention.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Quote Originally Posted by Rubberman View Post
    Get a hardware router that can also act as a firewall. They are cheap these days and avoids the need to deal with all the security cruft you would have to attend to on the router VM you mention.
    Hi,

    Thanks for your advice.

    I absolutely agree with your advice. A hardware router saves me lot of troubles.

    In my recent network setup;

    FTTH -> ONT -> PCs

    I already have an ONT on table and don't expect adding another device on top if I can use a software router.

    I have a 150M router. Maybe I can use it for running VMs although the speed is slower. If not running VMs I just pull it out of the network

    Regards
    satimis

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,038
    You can get gigabit routers as well, or can use a front-end switch to connect your PC's and VM's to. After all, the router is basically a front-end to the Internet, and most likely you don't have a gigabit connection there...
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Quote Originally Posted by Rubberman View Post
    You can get gigabit routers as well, or can use a front-end switch to connect your PC's and VM's to. After all, the router is basically a front-end to the Internet, and most likely you don't have a gigabit connection there...
    Yes, I'll test the connection with my 150M router first. The speed of FTTH is only 500mbps. Actually the VMs are for testing only and in case they need to assign a fixed internal IP for the test. Most the time I use Host for web browsing and documents management. The ONT assigns a fixed internal IP to the Host.

    Regards
    satimis

  7. #6
    Linux Newbie arespi's Avatar
    Join Date
    May 2011
    Location
    Monterrey , Mexico
    Posts
    240
    Quote Originally Posted by satimis View Post
    The speed of FTTH is only 500mbps
    Ha , "only 500mbps" I want some of that!

  8. #7
    Just Joined!
    Join Date
    Jul 2016
    Location
    Greater Charlotte NC Metro Area
    Posts
    23
    I'm coming in here a little late, did you make a decision and do this already? If not, when thinking of Oracle Virtualbox as your hypervisor, I might suggest Pfsense as a router if you intend to use network address translation connecting to the internet.. It does well in a virtual environment. Use virtio nics and set them as internal only on the inside interfaces. Just bridge one physical interface to the WAN port.

    Vanilla Freebsd works great for simple static routing back and forth between subnets if that's what you need. It's super lightweight on the hypervisor and works well with virtio nics.

    In freebsd the setup is really straight forward. Just use ee to edit /etc/rc.conf and put something in like this:
    hostname="SUNSERVER"
    ifconfig_xl0="inet 192.168.1.11 netmask 255.255.255.0"
    defaultrouter="192.168.1.1"
    gateway_enable="YES"
    sshd_enable="YES"
    ntpd_enable="YES"
    # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
    dumpdev="AUTO"

    Then save the file..
    Add in forwarding to sysctl so that the VM will route packets.
    sudo echo 'sysctl net.inet.ip.forwarding=1' >> /etc/sysctl.conf


    Using more than one string in static_routes creates multiple static routes.
    The following shows an example of adding static routes for the 192.168.0.0/24 and 192.168.1.0/24 networks:
    You would add these into /etc/rc.conf
    static_routes="net1 net2"
    route_net1="-net 192.168.0.0/24 192.168.0.1"
    route_net2="-net 192.168.1.0/24 192.168.1.1"

    In PFSENSE or FreeBSD the documentation on the web is more than sufficient for both if you care to do the reading.

    Good luck!
    CB

  9. #8
    -->
    Quote Originally Posted by calbo79 View Post
    I'm coming in here a little late, did you make a decision and do this already? If not, when thinking of Oracle Virtualbox as your hypervisor, I might suggest Pfsense as a router if you intend to use network address translation connecting to the internet.. It does well in a virtual environment. Use virtio nics and set them as internal only on the inside interfaces. Just bridge one physical interface to the WAN port.

    Vanilla Freebsd works great for simple static routing back and forth between subnets if that's what you need. It's super lightweight on the hypervisor and works well with virtio nics.

    In freebsd the setup is really straight forward. Just use ee to edit /etc/rc.conf and put something in like this:
    hostname="SUNSERVER"
    ifconfig_xl0="inet 192.168.1.11 netmask 255.255.255.0"
    defaultrouter="192.168.1.1"
    gateway_enable="YES"
    sshd_enable="YES"
    ntpd_enable="YES"
    # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
    dumpdev="AUTO"

    Then save the file..
    Add in forwarding to sysctl so that the VM will route packets.
    sudo echo 'sysctl net.inet.ip.forwarding=1' >> /etc/sysctl.conf


    Using more than one string in static_routes creates multiple static routes.
    The following shows an example of adding static routes for the 192.168.0.0/24 and 192.168.1.0/24 networks:
    You would add these into /etc/rc.conf
    static_routes="net1 net2"
    route_net1="-net 192.168.0.0/24 192.168.0.1"
    route_net2="-net 192.168.1.0/24 192.168.1.1"

    In PFSENSE or FreeBSD the documentation on the web is more than sufficient for both if you care to do the reading.

    Good luck!
    CB
    Hi CB,

    Lot of thanks for your advice. I'm now running a hardware router.

    Anyway I will create a VM testing your suggestion. I'm running Ubuntu14.04 as host and Oracle VirtualBox

    Regards
    satimis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •