No IP address displayed



  • Hi all,

    No IP address displayed, only an arrow (->) after em0 on the same line.
    (please refers to picture attached)

    Host - Ubuntu 12.04 64bit
    VM - pfSense
    Virtualizer - VirtualBox

    eth0 connected to cable modem, interface pppoe.  Host can connect Internet

    Ran "sudo ifconfig" to find ethernet MAC address of network interface.

    [check] Enable Network Adapter
    Bridge Adapter
    Name : eth0
    -> Advanced
    Promiscuous Mode: Deny
    MAC Address (change it to the MAC found as described above)
    [uncheck] Cable Modem

    Please help.  Thanks

    Rgds
    satimis



  • Netgate Administrator

    So where do you have the PPPoE session setup, in the host or pfSense? Hard to see how the host can connect top the internet if pfSense is running the PPPoE.
    You have spoofed the MAC in pfSense or in VirtualBox? Which interface?

    What are the settings on the em0 interface in pfSense? What IP address do you expect it to be?

    Steve



  • @stephenw10:

    So where do you have the PPPoE session setup, in the host or pfSense? Hard to see how the host can connect top the internet if pfSense is running the PPPoE.

    Hi,

    PPPoE session is setup on Host.  Before when I ran the connection of Host via -> Cable modem -> router
    There was address displayed

    You have spoofed the MAC in pfSense or in VirtualBox? Which interface?

    in pfSense.  Bridge Adapter/eth0

    What are the settings on the em0 interface in pfSense?

    Where can I find them?

    What IP address do you expect it to be?

    192.168.0.10/24

    Thanks

    Rgds
    satimis


  • Netgate Administrator

    So you've bridged the NIC in the host machine to the pfSense VM? And that's the same NIC that the host machine is running PPPoE over?

    How is the pfSense VM supposed to get an IP address in that range? Static IP? Are you running DHCP somewhere?

    Steve



  • @stephenw10:

    So you've bridged the NIC in the host machine to the pfSense VM? And that's the same NIC that the host machine is running PPPoE over?

    Not yet on Host

    $ cat /etc/network/interfaces```

    auto lo
    iface lo inet loopback

    auto eth0

    auto dsl-provider
    iface dsl-provider inet ppp
    pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
    provider dsl-provider

    iface eth0 inet manual

    
    > How is the pfSense VM supposed to get an IP address in that range? Static IP? Are you running DHCP somewhere?
    
    Static IP
    
    satimis

  • Netgate Administrator

    If the interface is set as static IP it should appear as:

     WAN (wan)      -> em0        -> v4: 192.168.0.10/24
    

    Did you set it as such in the initial setup?

    Steve



  • @stephenw10:

    If the interface is set as static IP it should appear as:

     WAN (wan)      -> em0        -> v4: 192.168.0.10/24
    

    Did you set it as such in the initial setup?

    Sorry, I couldn't recall correctly.

    When the connection on PC;
    ISP -> Cable Modem -> Router -> PC

    WAN (wan)  -> em0  -> v4/DHCP: 192.168.0.12/24
    (pls see attached img)

    Now
    ISP -> Cable Modem -> PC
    No IP address displayed

    satimis



  • Netgate Administrator

    Ah, so the WAN interface is set to DHCP not static. The router gives it an IP when it's connected. When it isn't there the pfSense VM must establish the PPPoE connection. It's going to be difficult to set that up without an internal interface of some sort. You could do by using the host machine and an additional virtual NIC. Alternatively you could use an addtional VM connected internally to pfSense.

    Steve



  • @stephenw10:

    Ah, so the WAN interface is set to DHCP not static. The router gives it an IP when it's connected. When it isn't there the pfSense VM must establish the PPPoE connection. It's going to be difficult to set that up without an internal interface of some sort. You could do by using the host machine and an additional virtual NIC.

    I have 2 physical NIC installed

    -> Network

    Adapter 1
    [check] Enable Network Adapter
    Attached to: Bridge Adapter
    Neme: eth0) (I'm only allowed selecting eth0 or eth1 here, unable creating a name)
    Advanced
    Adapter Type: Intel PRO/1000MT Desktop (8254OEM)
    Promiscuous Mode: Allow All
    MAC Address: xxxxxxxxx
    [check] Cable Connected
    [Port Forwarding] (greyout)

    Adapter 2
    [check] Enable Network Adapter
    Attached to: Internal Network
    Neme: intnet
    Advanced
    Adapter Type: Intel PRO/1000MT Desktop (8254OEM)
    Promiscuous Mode: Deny
    MAC Address: xxxxxxxxx
    [check] Cable Connected
    [Port Forwarding] (greyout)

    Alternatively you could use an addtional VM connected internally to pfSense.

    Please advise how to do it.  Pointer would be appreciated.

    Thanks

    satimis


  • Netgate Administrator

    What is the setup you're hoping to achieve with this in the end?

    The two NICs you listed above are they both real physical NICs? I'll assume they are.

    So technically I believe you could use the one NIC to be both the LAN and carry the PPPoE session that is the WAN but it will be complex to set up and hugely open to error!  ;)

    The should also the able to use the host machine to connect configure pfSense. I'm unfamiliar with virtualbox so I'll just outline what you would do. Create a virtual NIC in VB and add it to the pfSense VM. In pfSense assign that as the LAN interface. Do whatever is required in VB to make that NIC accessible by the host box and configure the host to use it as its default connection. The host should then receive an IP address from pfSense and you'll be able to connect the the webgui and configure the PPPoE connection.

    An alternative would be to add an additional VM, anything with a web browser. Then add a virtual switch in VB and add virtual NICs to connect the new VM to it as well is the pfSense VM. In pfSense add the new NIC as LAN. Now the new VM should receive an IP from pfSense in the default range. Open the VM and open a browser, go to the webgui at 192.168.1.1 and configure pfSense. Setup the PPPoE connection.

    Steve



  • @stephenw10:

    What is the setup you're hoping to achieve with this in the end?

    Hi,

    My goal is to run pfSense as router (virtual) without the physical router.  I don't expect touching the Host, keeping it clean.  I have only 2 PCs, each with VirtualBox installed having 10 VMs running on each of them.  The network will be as follow:-

    ISP -> Cable Modem -> eth0 of PC-1

    eth1 of PC-1 -> eth0 of PC-2 (only one physical NIC on PC-2)

    All VMs on both PC use the Virtual router for routing

    The two NICs you listed above are they both real physical NICs? I'll assume they are.

    Yes.  2 physical NICs.

    Open the VM and open a browser, go to the webgui at 192.168.1.1 and configure pfSense. Setup the PPPoE connection.

    I couldn't browse the webgui of pfSense on Host browser nor on another VM browser..  This is very strange to me.  I have installed another pfSense by importing pfSense.ova download.  Please see my new posting re "Unable to browse pfSense".  pfSense.ova was download on;
    http://files.nyi.pfsense.org/mirror/downloads/old/

    Now I have another image "pfSense-2.0.3-RELEASE-4g-amd64-nanobsd.img.gz" download.  I'll install another pfSense to check what will happen..

    satimis


  • Netgate Administrator

    This is probably now a Virtual Box config problem. I'm no VB expert but please post some network config for your VMs. I'm not sure how that will work since a quick google seems to show that VirtualBox doesn't have a convenient network map.

    Steve



  • @stephenw10:

    This is probably now a Virtual Box config problem. I'm no VB expert but please post some network config for your VMs. I'm not sure how that will work since a quick google seems to show that VirtualBox doesn't have a convenient network map.

    $ cat /etc/network/interfaces```

    auto lo
    iface lo inet loopback

    VM1 and VM2 the same.
    
    Host:
    $ cat /etc/network/interfaces```
    
    auto lo
    iface lo inet loopback
    
    auto eth0
    
    auto dsl-provider
    iface dsl-provider inet ppp
    pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
    provider dsl-provider
    
    iface eth0 inet manual
    
    

    satimis


  • Netgate Administrator

    What are VM1 and VM2?
    Th host configuration is not important either. We need to see how VirtualBox's internal virtual network is configured. For example see the attached screenshot that I've shamelessly borrowed from Jonpoz. That's how ESXi shows it's network config.

    Steve




  • @stephenw10:

    What are VM1 and VM2?

    VM1 - Ubuntu 12.04 desktop
    VM2 - LinuxMint desktop

    Th host configuration is not important either. We need to see how VirtualBox's internal virtual network is configured. For example see the attached screenshot that I've shamelessly borrowed from Jonpoz. That's how ESXi shows it's network config.

    How to find it?  Thanks

    satimis


  • Netgate Administrator

    Hmm, Ok some reading later. It appears, and correct me if I'm wrong here, that there is no real concept of a switch in Virtual Box at least not by default. You can add various things like openvswitch to do it but it's not standard. There's also no easy way to view the whole network config as there is in ESXi so we have to go through it step by step. There are at least two internal networks that can be used to separate VMs and we can use for pfSense. There are also a ton of tutorials out there like this one: http://pc-addicts.com/how-to-install-pfsense-in-virtualbox/

    Edit: Just watch that linked video. In fact you have as many independent internal networks as you want, the switches are implied.

    So the pfSense VM should have two network adapters enabled. The first should be a bridge adapter, that will be the pfSense WAN. The second should be an internal adapter, that will be the pfSense LAN.
    The VM you are suing to configure pfSense should have one network adapter and it should be the internal type.
    The internal adapters of both VMs MUST have the same name otherwise they will be isolated.

    I'm unsure about adding an adapter to allow the host to access the internet through pfSense though.  :-\

    Steve



  • @stephenw10:

    Hmm, Ok some reading later. It appears, and correct me if I'm wrong here, that there is no real concept of a switch in Virtual Box at least not by default. You can add various things like openvswitch to do it but it's not standard. There's also no easy way to view the whole network config as there is in ESXi so we have to go through it step by step. There are at least two internal networks that can be used to separate VMs and we can use for pfSense. There are also a ton of tutorials out there like this one: http://pc-addicts.com/how-to-install-pfsense-in-virtualbox/

    • snip-

    Thanks for your link.

    I have no problem to install pfSense but unable making it to work.  I have tried importing .ova and .vdi download on Internet.  pfSense can start without probem.  But I couldn't browse it on VM and Host.

    em0 -> (not pointing to device/IP address)
    (see image attached)

    It can't connect ISP even after filling in the MAC address.

    I watched following video;
    Setup Virtual Lab | Networking and Virtualbox
    Youtube Video

    The physical setup is behind a physical router
    ISP (pppoe/ethernet) -> Router -> PC

    What I expect to achieve is without a physical route.  If it is a MUST behind a physical router that is NOT what I expect to do.

    satimis




  • Hi stephenw10,

    Further to my late posting I found following article:
    Virtualize your router using pfSense and Virtualbox
    http://www.area536.com/projects/virtualize-your-router-using-pfsense-and-virtualbox/

    It seems to me possible to replace the physical router with pfSense as virtual router.

    I made another round download pfSense-2.0.3-RELEASE-amd64.ova and import it to VirtualBox.  Thereafter started it without problem.  Both em0 and em1 are connected.
    (see attached image)

    Adapter-1
    Bridge Adapter
    eth0

    Adapter-2
    Bridge Adapter
    eth1

    WAN (wan)  -> em1  -> 192.168.0.11 (DHCP)
    LAN (lan)  -> em0  -> 192.168.1.1

    But still I couldn't browse it on Host browser running;
    http://192.168.1.1
    or
    https://192.168.1.1

    It is quite strange to me.

    satimis



  • Netgate Administrator

    You will have to browse to the pfSense webgui from the internal VM and make sure they both connected to the same internal network name.
    What OS are you using for the other VM? Does it receive an IP from the pfSense DHCP server?

    Steve



  • @stephenw10:

    You will have to browse to the pfSense webgui from the internal VM and make sure they both connected to the same internal network name.

    I got it, thanks

    VM - Ubuntu 12.04 desktop 64bit
    On browser ran;
    192.168.1.1

    -> Add Exception
    Get Certificate
    [check] Permanently store this exception
    -> Confirm Security Exception

    Pls see attached images.

    Adapter-1 same as pfSense
    Adapter-2 same as pfSense

    What will be the login and password ?

    Where can I find tutorial using the webgui pfSense to configure ?

    $ cat /etc/network/interfaces```

    auto lo
    iface lo inet loopback

    
    sudo ifconfig
    

    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d 
              inet addr:192.168.0.12  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4549 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3824 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:4787482 (4.7 MB)  TX bytes:630362 (630.3 KB)

    eth1      Link encap:Ethernet  HWaddr 08:00:27:e6:ca:14 
              inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fee6:ca14/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:267 errors:0 dropped:0 overruns:0 frame:0
              TX packets:268 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:176246 (176.2 KB)  TX bytes:37546 (37.5 KB)

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:254 errors:0 dropped:0 overruns:0 frame:0
              TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:44773 (44.7 KB)  TX bytes:44773 (44.7 KB)

    
    I don't think Ubuntu 12.04 receive IP from pfSense routing?
    
    On Host
    $ sudo ifconfig```
    
    eth0      Link encap:Ethernet  HWaddr 00:26:18:44:b6:1a  
              inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::226:18ff:fe44:b61a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:14177 errors:0 dropped:0 overruns:0 frame:0
              TX packets:12287 errors:0 dropped:0 overruns:0 carrier:4
              collisions:0 txqueuelen:1000 
              RX bytes:15365450 (14.6 MiB)  TX bytes:1973191 (1.8 MiB)
              Interrupt:18 
    
    eth1      Link encap:Ethernet  HWaddr 90:f6:52:03:57:86  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:43 Base address:0xe000 
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:8 errors:0 dropped:0 overruns:0 frame:0
              TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:480 (480.0 B)  TX bytes:480 (480.0 B)
    
    

    What OS are you using for the other VM?

    I have Ubuntu/LinuxMint/OpenSUSE running here.

    Does it receive an IP from the pfSense DHCP server?

    I don't think so.  It receive IP from the physical router

    Connection;
    ISP -> Cable Modem -> Router -> PC eth0 (built-in NIC of motherboard)

    After making sure it works I'll change back to;
    ISP -> Cable Modem -> PC eth0 (built-in NIC of motherboard)







  • Netgate Administrator

    Aha!  :)
    The default login is admin:pfsense
    The IP address in the Ubuntu VM, 192.168.1.100 is in the pfSense LAN default subnet. Is is not receiving that from the pfSense VM? Or did you set it manually? It looks like your physical router is using 192.168.0.X for its lan side subnet.
    Why do you have two NICs in the Ubuntu VM?

    There are many tutorials for setting up pfSense. Check Youtube, the docs wiki here, many places.  :) When you first login there is a wizard to guide through the initial setup anyway.

    Set the WAN to DHCP. It should then receive an IP from your physical router and you will be able to ping things from the pfSense console. Then when you know that the pfSense VM has connectivity to the router try removing the router and reconfiguring the pfSense WAN for PPPoE.

    Steve



  • @stephenw10:

    Aha!  :)
    The default login is admin:pfsense

    Thanks  Now I can login.

    The IP address in the Ubuntu VM, 192.168.1.100 is in the pfSense LAN default subnet. Is is not receiving that from the pfSense VM? Or did you set it manually? It looks like your physical router is using 192.168.0.X for its lan side subnet.

    pfSense is now working on my system, routing the traffic to all VMs on PC-1

    PC-2
    Connect the physical NIC of PC-1 to that of PC-2
    Now PC-2 can connect ISP browsing Internet.

    Setting of static IP on VMs of PC-2 (MintLinux)

    $ cat /etc/network/interface```

    auto lo
    iface lo inet loopback

    The primary network interface

    auto eth0
    iface eth0 inet static
            address        192.168.1.11
            dns-nameservers xxx.xxx.xxx.xxx
            network        192.168.1.1/100
            netmask        255.255.255.0
            gateway        192.168.1.1

    
    $ sudo ifconfig```
    
    eth0      Link encap:Ethernet  HWaddr 08:00:27:b5:8d:04  
              inet addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:feb5:8d04/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:209 errors:0 dropped:0 overruns:0 frame:0
              TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:220407 (220.4 KB)  TX bytes:25932 (25.9 KB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    

    Why do you have two NICs in the Ubuntu VM?

    I was not sure which virtual NIC would work, eth0 and eth1.  Later I found it eth1.  Now I have unchecked Adapter 2"

    Why eth1 NOT eth0?

    There are many tutorials for setting up pfSense. Check Youtube, the docs wiki here, many places.

    Yes, Google found me many including the official tutorial of pfSense.  I just wonder which of them is suitable to me.

    Set the WAN to DHCP. It should then receive an IP from your physical router and you will be able to ping things from the pfSense console. Then when you know that the pfSense VM has connectivity to the router try removing the router and reconfiguring the pfSense WAN for PPPoE.

    Thanks.  I'll check it later to see whether;
    ISP -> Cable Modem -> PC-1

    this connect will work.  Interface here is PPPoE.  It worked before installing/running pfSense.

    satimis


  • Netgate Administrator

    @satimis:

    Why eth1 NOT eth0?

    Well I'm guessing since I can't see your VM config but I'd say eth0, adapter1, was set as a bridge so it connects directly to the physical router whereas eth1, adapter2, is set as type internal so it connects to the pfSense LAN.

    @satimis:

    Thanks.  I'll check it later to see whether;
    ISP -> Cable Modem -> PC-1  this connect will work.  Interface here is PPPoE.  It worked before installing/running pfSense.

    This should work OK since you know the pfSense WAN has connectivity to the physical NIC. However be aware that when you apply those new settings you will loose connectivity at the host(PC1) and probably at PC2. The PPPoE connection will now be terminated in the pfSense VM so the only internet connectivity will be via pfSense. You will have to add a 'host only' adapter in order for the host PC to use the connection.

    What address is the PC2 machine receiving?

    Do you want the VMs on PC2 to be in the same network at the VMs on PC1?

    Steve



  • @stephenw10:

    • snip -

    @satimis:

    Thanks.  I'll check it later to see whether;
    ISP -> Cable Modem -> PC-1  this connect will work.  Interface here is PPPoE.  It worked before installing/running pfSense.

    This should work OK since you know the pfSense WAN has connectivity to the physical NIC. However be aware that when you apply those new settings you will loose connectivity at the host(PC1) and probably at PC2. The PPPoE connection will now be terminated in the pfSense VM so the only internet connectivity will be via pfSense. You will have to add a 'host only' adapter in order for the host PC to use the connection.

    I have spent more than 2 hours and could not make VM (Ubuntu12.04 desktop) connecting Internet

    pfSense (see attached image)

    Adapter-1
    Bridge
    eth0
    Adapter-2
    Bridge
    eth1

    VM PC1
    satimis@ub12043dk00:~$ sudo ifconfig```

    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d 
              inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:28 errors:0 dropped:0 overruns:0 frame:0
              TX packets:275 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:2680 (2.6 KB)  TX bytes:57037 (57.0 KB)

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:204 errors:0 dropped:0 overruns:0 frame:0
              TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:15804 (15.8 KB)  TX bytes:15804 (15.8 KB)

    
    satimis@ub12043dk00:~$ ping yahoo.com```
    
    ping: unknown host yahoo.com
    

    satimis@ub12043dk00:~$ ping 67.195.160.76```

    PING 67.195.160.76 (67.195.160.76) 56(84) bytes of data.
    From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
    From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
    From 192.168.1.1 icmp_seq=3 Destination Host Unreachable

    
    Adapter-1
    Bridge
    eth0
    Adapter-2
    Bridge
    eth1
    Adapter-3
    Host-only Adapter
    
    pfSense (pls see attached image)
    
    VM still unable to connect Internet.
    
    However VM can login 192.168.1.1
    
    During booting pfSense following warning displayed```
    
    ..
    Starting NTP time client .. . Error : Error : hostname nor servname provided, or not known
    Error : hostname nor servname provided, or not known
    ..
    

    It held there for long time.  How to fix it?

    What address is the PC2 machine receiving?

    Host
    IIRC 192.168.1.3

    Do you want the VMs on PC2 to be in the same network at the VMs on PC1?

    Can I create another network?  If YES, pls advise HOW?  Thanks

    Rgds
    satimis





  • Netgate Administrator

    @satimis:

    pfSense (see attached image)

    Adapter-1
    Bridge
    eth0
    Adapter-2
    Bridge
    eth1

    That's the pfSense VM?
    The pfSense LAN interface must be type 'internal' in VBox. Otherwise it can't connect to the other VMs in PC1 which are also using the internal network.

    @satimis:

    VM PC1
    satimis@ub12043dk00:~$ sudo ifconfig```

    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d 
              inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:28 errors:0 dropped:0 overruns:0 frame:0
              TX packets:275 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:2680 (2.6 KB)  TX bytes:57037 (57.0 KB)

    How is that IP being set in the Ubuntu VM? It should be set to DHCP and receiving its address from pfSense.

    @satimis:

    Adapter-1
    Bridge
    eth0
    Adapter-2
    Bridge
    eth1
    Adapter-3
    Host-only Adapter

    Which VM is that?

    @satimis:

    During booting pfSense following warning displayed```

    ..
    Starting NTP time client .. . Error : Error : hostname nor servname provided, or not known
    Error : hostname nor servname provided, or not known
    ..

    It held there for long time.  How to fix it?
    

    That happens if pfSense is unable to connect to an external NTP server to update its time. Not a good sign.

    @satimis:

    Can I create another network?  If YES, pls advise HOW?  Thanks

    Yes you could create another interface in pfSense to connect the PC2 host. That will then have a different subnet and could have a different set of firewall rules. You can filter any traffic between PC1 VMs and PC2 VMs.

    Steve



  • Hi Steve,

    Just discovered that pfSense has no function after Host (PC1) connected ISP running pppoe.

    PC1 VM (Ubuntu)
    Adapter
    NAT

    pfSense NOT running

    ~$ sudo ifconfig```

    [sudo] password for satimis:
    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d 
              inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:119229 errors:0 dropped:0 overruns:0 frame:0
              TX packets:66072 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:97656834 (97.6 MB)  TX bytes:5485570 (5.4 MB)

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:1018 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1018 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:190128 (190.1 KB)  TX bytes:190128 (190.1 KB)

    
    PC2 unable to connect Internet
    
    ifconfig```
    
    ....
    inet addr: 192.168.1.103  Bcast:192.168.1.255  Mask:255.255.255.0
    ....
    
    

    @stephenw10:

    @satimis:

    pfSense (see attached image)

    Adapter-1
    Bridge
    eth0
    Adapter-2
    Bridge
    eth1

    That's the pfSense VM?

    Yes

    The pfSense LAN interface must be type 'internal' in VBox. Otherwise it can't connect to the other VMs in PC1 which are also using the internal network.

    Tried.

    Adapter-1
    internal
    Adapter-2
    Bridge
    eth1 (also tried eth0)

    PC1 VM (if Adapter 1 set to Bridge) and PC2 Host unable to connect Internet. 
    If Adapter set to NAT, VM gets connection via the Host

    How is that IP being set in the Ubuntu VM? It should be set to DHCP and receiving its address from pfSense.

    If PC1 VM

    Adapter 1
    NAT

    VM gets connection on Host not pfSense.

    @satimis:

    Adapter-1
    Bridge
    eth0
    Adapter-2
    Bridge
    eth1
    Adapter-3
    Host-only Adapter

    Which VM is that?

    Not VM.  pfSense

    @satimis:

    During booting pfSense following warning displayed```

    ..
    Starting NTP time client .. . Error : Error : hostname nor servname provided, or not known
    Error : hostname nor servname provided, or not known
    ..

    It held there for long time.  How to fix it?
    

    That happens if pfSense is unable to connect to an external NTP server to update its time. Not a good sign.

    I have tried googling a while with a solution to me.  The solution found relating to BSD.  I import pfSense.ova on their server.  However I didn't find this problem on following physical network connect:
    ISP -> Cable Modem -> Router - PC

    @satimis:

    Can I create another network?  If YES, pls advise HOW?  Thanks

    Yes you could create another interface in pfSense to connect the PC2 host. That will then have a different subnet and could have a different set of firewall rules. You can filter any traffic between PC1 VMs and PC2 VMs.

    Is it adding another Adapter say Adapter 3 on pfSense?

    I'll come back to this question later after sorting out my recent problem.

    Rgds
    satimis


  • Netgate Administrator

    Ok, I think we have a bit of a miscommunication problem here. A diagram would probably go a long way to help that. I'll try to draw something up this afternoon.

    I can well believe that the pfSense VM has a problem if you are using PPPoE directly from its host PC. Why are you doing PPPoE from PC1? The PPPoE session should be in the pfSense WAN interface.

    What happens when you try to start pfSense?

    You should forget PC2 until you have pfSense running correctly with PC1 and the VMs hosted by PC1. Then add PC2.

    If you have any adapters set to type 'NAT' in VBox then you will be bypassing pfSense. All the NAT should be done by pfSense.

    pfSense is being run inside a VM like any of the other OSes, they are all just VMs to Vbox.

    Steve



  • @stephenw10:

    Ok, I think we have a bit of a miscommunication problem here. A diagram would probably go a long way to help that. I'll try to draw something up this afternoon.

    Thanks

    I can well believe that the pfSense VM has a problem if you are using PPPoE directly from its host PC. Why are you doing PPPoE from PC1? The PPPoE session should be in the pfSense WAN interface.

    I'll use another ISP on the coming early April.  The new ISP shall not provide router but an ONT for connecting my PC.  The new service will be FTTH Fibre Optic Service, 100MB/100MB..  Therefore I have to provide a router for collecting 2 PCs.  PC1 is my daily working PC with 10 VMs running.  PC2 is a spare PC also with 10 VMs running.  The latter is NOT running round the clock.  If I succeed installing/running pfSense as router on PC1 then I don't need purchasing a router.  I just plug a Cat5e cable to NIC2 of PC1 and to NIC of PC2 when I use the latter.

    What happens when you try to start pfSense?

    Nothing special found.  I can't use it as router to routing Internet connection to VM of PC1.  I haven't tested the VM on PC2.  What I noticed was I can start the login page of pfSense on browser of PC2 but unable to login.

    You should forget PC2 until you have pfSense running correctly with PC1 and the VMs hosted by PC1. Then add PC2.

    OK

    If you have any adapters set to type 'NAT' in VBox then you will be bypassing pfSense. All the NAT should be done by pfSense.

    pfSense is being run inside a VM like any of the other OSes, they are all just VMs to Vbox.

    Noted.  Thanks

    Rgds
    satimis


  • Netgate Administrator

    Right rather than my usual 'WordCad' effort I thought I'd give gliffy a try. Think I need more practise!  ::)
    Anyway here's the diagram. I didn't put any IPs or subnets on there since that's up to you really.
    I hope you can understand it.

    Steve




  • @stephenw10:

    Right rather than my usual 'WordCad' effort I thought I'd give gliffy a try. Think I need more practise!  ::)
    Anyway here's the diagram. I didn't put any IPs or subnets on there since that's up to you really.
    I hope you can understand it.

    Hi,

    Thanks for your diagram.

    Performed following steps but without result.

    Started pfSense```

    ........
    Configuring WAN interface ......
    (holding here for a long time but finally done)
    Configuring WAN interface done
    .....

    
    Also holding here for long time```
    
    ....
    Starting NTP time client .. . Error : Error : hostname nor servname provided, or not known
    Error : hostname nor servname provided, or not known
    ....
    
    

    WAN (wan)  -> em1  -> NONE (DHCP)
    LAN (lan  -> em0  -> 192.168.1.1

    VM Ubuntu 12.04 desktop

    Network -> Adapter 1
    Bridged Adapter
    eth1 (not eth0)

    It can ping 192.168.1.1 but unable to ping yahoo.com

    Also on browser I can login pfSense

    $ sudo ifconfig```

    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d 
              inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:48 errors:0 dropped:0 overruns:0 frame:0
              TX packets:102 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:4344 (4.3 KB)  TX bytes:13633 (13.6 KB)

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:84 errors:0 dropped:0 overruns:0 frame:0
              TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:5660 (5.6 KB)  TX bytes:5660 (5.6 KB)

    
    According to following article:
    Virtualize your router using pfSense and Virtualbox
    http://www.area536.com/projects/virtualize-your-router-using-pfsense-and-virtualbox/
    
    I further performed following steps:
    
    Host
    ====
    $ sudo ifconfig```
    
    eth0      Link encap:Ethernet  HWaddr 00:26:18:44:b6:1a  
              inet6 addr: fe80::226:18ff:fe44:b61a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1229 errors:0 dropped:0 overruns:0 frame:0
              TX packets:1627 errors:0 dropped:0 overruns:0 carrier:1
              collisions:0 txqueuelen:1000 
              RX bytes:883218 (862.5 KiB)  TX bytes:324344 (316.7 KiB)
              Interrupt:18 
    
    eth1      Link encap:Ethernet  HWaddr 90:f6:52:03:57:86  
              UP BROADCAST MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
              Interrupt:43 Base address:0x4000
    ....
    ....
    
    

    eth0   HWaddr 00:26:18:44:b6:1a
    MAC  00261844b61a

    eth1      Link encap:Ethernet  HWaddr 90:f6:52:03:57:86
    MAC 90f652035786

    Tried changing following MAC Address on both eth0 and eth1

    MAC  00261844b61a/00261844B61A
        90f652035786/90F652035786

    Still the same pfSense can't connect ISP

    A side question, how to draw your diagram?

    Rgds
    satimis


  • Netgate Administrator

    @satimis:

    
    ........
    Configuring WAN interface ......
    (holding here for a long time but finally done)
    Configuring WAN interface done
    .....
    
    

    Also holding here for long time```

    ....
    Starting NTP time client .. . Error : Error : hostname nor servname provided, or not known
    Error : hostname nor servname provided, or not known
    ....

    That's expected behaviour as it tries to obtain an IP address via DHCP (and fails) and then tries to get the time from an NTP server (and fails).

    @satimis:

    WAN (wan)  -> em1  -> NONE (DHCP)
    LAN (lan  -> em0  -> 192.168.1.1

    Ok, so which adapter is which? Is the router still in it's standard mode, handing out IP address on it's LAN? If so then probably have the interfaces the wrong way around. This worked earlier. You set the interface that is assigned to the pfSense WAN to 'bridged interface' and pfSense recived an IP on its WAN from the router. It was em1 there too though so perahps you have changed the WAN adapter to 'internal' in VBox instead of the LAN.

    @satimis:

    VM Ubuntu 12.04 desktop

    Network -> Adapter 1
    Bridged Adapter
    eth1 (not eth0)

    It can ping 192.168.1.1 but unable to ping yahoo.com
    Also on browser I can login pfSense

    The Ubuntu VM that we are using to configure pfSense should have only one adapter enabled on it and it should be type 'Internal'. It is shown as any of the VMs I have on PC1 in my diagram. It should be set to use DHCP in Ubuntu so that you can see when it is correctly receiving an IP from pfSense.

    It seems likely that you have accidentally set the pfSense VM WAN adapter to internal and the LAN adapter to bridged. In that instance the pfSense LAN would be accessible via a bridged adapter on the Ubuntu VM because they are both bridged to the same physical NIC in the host.

    If that is the case you need rectify this by either reassigning the interfaces in pfSense, WAN as em0 and LAN as em1, OR change the adapter types in VBox so the the correct adapters are bridged and internal.

    Forget about MAC addresses for now. You may have to spoof the WAN MAC address in pfSense if your ISP requires that

    @satimis:

    A side question, how to draw your diagram?

    I used giffly.com gliffy.com. The first time I used it hence the colours are at bit odd. Haven't worked out how to change that yet.  ::)



  • Hi Steve,

    pfSense was imported on "pfSense-2.0.3-RELEASE-amd64.ova" download on pfSense website.

    Remark:
    I'm confused here.  Physical NIC-1 (eth0) is onboard (motherboard) and physical NIC-2 (eth1) is a PCI-e Gigabit NIC.  On host they are displayed correctly.  However on pfSense and VM NIC-1 becomes eth1 and NIC-2 eth0

    Changed eth0 and eth1 back to their original MAC Addresses.  Started pfSense

    Adapter 1
    Attached to: Bridge
    eth0

    Adapter 2
    Attached to: Bridge
    eth1

    VM 12.04 Desktop

    Adapter 1
    Attached to: Internal Network
    Name: intnet

    $ sudo ifconfig

    
    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d  
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:12394 (12.3 KB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:16 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:1312 (1.3 KB)  TX bytes:1312 (1.3 KB)
    
    

    $ ping 192.168.1.1
    connect: Network is unreachable

    I think my problem is pfSense can't establish a second connection to ISP via the virtual NIC.  Because Host is already connected to ISP.  Seemly second connection is NOT allowed unless behind a physical router.

    Other advice noted with thanks.

    satimis


  • Netgate Administrator

    The pfSense VM needs to have :

    Adapter 2
    Attached to: Internal Network
    Name: intnet

    That is the adapter that is then set as the pfSense LAN interface.

    Steve



  • @stephenw10:

    The pfSense VM needs to have :

    Adapter 2
    Attached to: Internal Network
    Name: intnet

    That is the adapter that is then set as the pfSense LAN interface.

    Steve

    Performed following steps

    pfSense
    Adapter 1
    Bridge
    eth0 (also tried eth1)

    Adapter 2
    Internal Network
    intnet

    WAN still can't connect ISP

    WAN (wan) -> em1 -> NONE (DHCP)
    LAN (lan) -> em0 -> 192.168.1.1

    VM Ubuntu
    Adapter 1
    Bridge
    eth1 (also tried eth0)

    same output;

    $ sudo ifconfig```

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:176 errors:0 dropped:0 overruns:0 frame:0
              TX packets:176 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:14432 (14.4 KB)  TX bytes:14432 (14.4 KB)

    
    Rgds
    satimis

  • Netgate Administrator

    You changed the Ubuntu VM adapter type. That has to be Internal also so it can talk to the pfSense LAN.

    Do you have the router connected to the physical NIC that is bridged to the pfSense WAN adapter?

    Steve



  • @stephenw10:

    You changed the Ubuntu VM adapter type. That has to be Internal also so it can talk to the pfSense LAN.

    Have another round

    pfSense
    Adapter 1
    Bridge
    eth0

    Adapter 2
    Internal Network
    intnet

    WAN (wan) -> em1 -> NONE (DHCP)
    LAN (lan) -> em0 -> 192.168.1.1

    VM Ubuntu
    Adapter 1
    Internal Network
    intnet

    $ sudo ifconfig```

    lo        Link encap:Local Loopback 
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:16 errors:0 dropped:0 overruns:0 frame:0
              TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:1312 (1.3 KB)  TX bytes:1312 (1.3 KB)

    
    $ ping 192.168.1.1```
    
    connect: Network is unreachable
    
    

    pfSense
    Adapter 1
    Bridge
    eth1

    WAN (wan) -> em1 -> NONE (DHCP)
    LAN (lan) -> em0 -> 192.168.1.1

    VM Ubuntu
    Adapter 1
    Internal Network
    intnet

    $ sudo ifconfig

    
    eth0      Link encap:Ethernet  HWaddr 08:00:27:10:8c:3d  
              inet6 addr: fe80::a00:27ff:fe10:8c3d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1 errors:0 dropped:0 overruns:0 frame:0
              TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:60 (60.0 B)  TX bytes:11704 (11.7 KB)
    
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:464 errors:0 dropped:0 overruns:0 frame:0
              TX packets:464 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:37760 (37.7 KB)  TX bytes:37760 (37.7 KB)
    
    

    Do you have the router connected to the physical NIC that is bridged to the pfSense WAN adapter?

    No.  If PC1 is connected behind a router.  It worked already, about 2 days ago.

    Present connection:
    ISP -> Cable Modem -> PC1
    Interface - pppoe

    satimis


  • Netgate Administrator

    Hmm, OK. So if both the pfSense LAN and the Ubuntu NIC are on the same internal network then either the DHCP server is not enabled on the pfSense (it would be enabled by default) or the Ubuntu VM is not set to use DHCP.
    In your second setup you can see the Ubuntu VM sees the interface as UP but isn't receiving an IP.

    If you have the router in place then it will hand out an IP to the pfSense WAN and you will be able see immediately if you have the correct adapters assigned to the interfaces.

    Steve



  • Hi Steve

    The problem is my modem only has 1 IP address to assign.  Debian Host is getting this IP address before pfSense starts up.  I must sort out this problem first.  Secondly login and password are needed for assigning IP address.  Where shall I enter them to assign the IP address to pfSense in order to get connection to Internet?

    satimis


  • Netgate Administrator

    Well you could do that but as you say you need to be able to enter the PPP username/password to pfSense and you can only do that (without resorting to manually editing files) via the webgui. To access the webgui you need to sort out the connection between the pfSense LAN interface and Ubutu VM you're using for administration.
    If you put the router back inplace between the modem and PC1 then it will hand out a private IP to pfSense which you will be able to immediately see in the pfSense console. That will make it much easier to determine that you have the LAN interface assigned to the correct VM adapter and that that adapter is configured correctly.

    Steve


  • Banned

    Cannot you just add serial port in Virtualbox and use that as console?


Log in to reply