Forums

John F
John F
Offline
Resolved
0 votes
I'll admit upfront that I'm not a network genius, hence why I'm here asking for help.

I've been reading that you should be putting your router before ClearOS using DMZ so that ClearOS handles all the traffic.
What I don't understand is how to get wireless working. I'm guessing you are needing a router before ClearOS AND a wirless router after.

Why can't you just put one (wirless) router in front of ClearOS?
Friday, March 24 2017, 03:41 PM
Share this post:
Responses (21)
  • Accepted Answer

    Friday, March 24 2017, 06:20 PM - #Permalink
    Resolved
    1 votes
    I'm going to delete your other post which is a duplicate, just to keep things tidy. If you're a new poster your first couple of posts get moderated so they don't appear immediately.

    How you can set your system up can depend on how you connect to the internet and how you want ClearOS to work. If you have a separate modem you don't (shouldn't) need your router1. ClearOS can connect directly to your modem.

    Is your modem cable or ADSL? If it is cable, it will probably pass your WAN IP straight through to ClearOS. If it is ADSL it will probably give ClearOS a private IP - you should be able to see what WAN IP your router1 is getting.

    For router2, if ClearOS has only one LAN NIC, connect a LAN port on the router to the ClearOS LAN, but you must disable the DHCP server in the router and give it a fixed IP on the ClearOS LAN subnet. In this configuration your wired and wireless devices are all on the same subnet.

    If your modem is ADSL, for a more advanced set up, you can try setting your modem to bridge mode then change your ClearOS WAN type to PPPoE. In this configuration, ClearOS will get your WAN IP directly.
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 15 2017, 07:12 PM - #Permalink
    Resolved
    1 votes
    Consumer based routers make the assumption that they should be your gateway. In cases where the ISP is providing you with a gateway then you are limited in using their 'wireless' and you probably want to use another wireless device. But in the case that you can put ClearOS directly on the ISP equipment then you can protect your wireless users without incurring another 'NAT'.

    To do this, plug ClearOS directly into your ISP's router. at this point you are either going to get a public IP address or an RFC1918 address (192.168.x.x, 172.16.x.x - 172.31.x.x, 10.x.x.x). If you get an RFC1918 address then you are going to end up double-NATting with ClearOS. The good news is that you can avoid triple NATting or double NATting even if you are using a consumer based router for your wireless behind ClearOS. Of course the most simple thing to do is to just plug your router's internet feed into the back of your ClearOS server but this is what you can do instead.

    With a laptop or other device plugged into your router that isn't connected, accomplish these tasks:

    - Set the internet setting to DHCP
    - Don't plug anything into the internet side of the router
    - Turn off DHCP on the router.
    - Setup the LAN side of the router to use a static IP address that would exist on your ClearOS network. For example, if ClearOS is 10.50.100.1/255.255.255.0 on the LAN side, set the router to be 10.50.100.25/255.255.255.0
    - Plug one of the 4 LAN ports from your ClearOS LAN interface into the Wireless router.

    Voila, now your consumer-based router is a 4-port ethernet switch with wireless access point. Using routers as wireless access points is often more cost-effective than purchasing wireless access points. Why? well, same wireless plus 4 port switch. So what do you do with the extra jack on the router that would go to the Internet? Nothing, ever, don't need it, don't use it.
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Friday, July 28 2017, 01:54 PM - #Permalink
    Resolved
    1 votes
    Only one is plugged in. See this attachment.
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Friday, July 28 2017, 02:40 PM - #Permalink
    Resolved
    1 votes
    Alright. Your DHCP server is a mess. If you cannot edit the settings for enp1s6, you'll have to delete it and re-add it.

    I am also not sure what has happened to network.conf. Please can you remove the reference to eth0 manually? Then can you either reboot or make a trivial change to your IP settings then revert it to force networking to restart.

    I still cannot see it working properly as ClearOS is always going to try to communicate through its WAN interface for any traffic not for its LAN. In the standalone mode, ClearOS should connect to the LAN through its WAN interface. It may be OK temporarily if you are trying to make the change before swapping your router and ClearOS round in your network.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 04 2017, 11:42 AM - #Permalink
    Resolved
    0 votes
    What is the intention for this router? Are you wanting to turn it into a WAP on your LAN? If you are, firstly I hope you've configured your LAN not to use the 192.168.0.0/24 and 192.168.1.0/24. Although they both work, they are better avoided. Valid ranges are somewhere within 192.168.0.0/16, 172.16.0.0/12 and 10.0.0.0/8. If you change ClearOS you may need to reboot your PC to get it to pick up a new IP address. Then, for your router, change the LAN IP address to something in the same subnet as ClearOS but a different address. Typically ClearOS will have an x.y.z.1 address so give the router something like .2 or .254 (you can't use .0 or .255). Also disable the DHCP server on the router (probably under the network tab). Then connect a router LAN port to the ClearOS LAN port (or a switch connected to the ClearOS LAN port). Do not use the router WAN port. You may use any of the remaining LAN ports as you would with an ethernet switch.
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Monday, April 03 2017, 08:53 PM - #Permalink
    Resolved
    0 votes
    OK, almost there, and I'll admit upfront that I am a newbie . ..

    I've got everything figured out except getting the router to work.

    Here are my router settings right now. How do I set it up?

    (The router is netis and I provided the advanced and quick options)
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Friday, July 14 2017, 11:21 PM - #Permalink
    Resolved
    0 votes
    I have been unable to get the router option to work, so I decided to simplify, and just connect clearos 'external' to the modem, which picks up the ISP-designated IP address to that port, and plug my laptop into the clearos LAN port. I've tried Static and DHCP, but am not getting any traffic at all out of the LAN port, on the same subnet.
    Perhaps a bad network driver or network configuration?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 15 2017, 06:23 PM - #Permalink
    Resolved
    0 votes
    The ClearOS LAN and WAN must be on different subnets and (unless you have a clever switch with VLANS) on a separate physical LAN. Because they are too common, it is best to avoid 192.168.0.0/24 and 192.168.1.0/24 as your LAN subnets.
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Wednesday, July 19 2017, 02:18 PM - #Permalink
    Resolved
    0 votes
    I setup the network based on Dave's recommendations.
    ClearOS - 192.168.1.1 / 255.255.255.0
    Router (Netgear AC1600) - 192.168.1.88 / 255.255.255.0

    disabled DHCP on router.

    Can't connect to 192.168.1.1 from laptop Wifi/Ethernet
    CAN ping 192.168.1.88 from ClearOS fine
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 19 2017, 06:44 PM - #Permalink
    Resolved
    0 votes
    What you want is something like in my attached shot - if it attaches.

    BTW, 192.168.0.0/24 and 192.168.1.0/24 are not brilliant to use.

    What is your ClearOS WAN IP?

    Another thing to check is if Windows is blocking you as it has detected a new network which you need to configure. I know the new network wizard does not always pop up.

    Try with the router wired LAN first. For wireless make sure there is no option to isolate the WLAN from the LAN selected.
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Saturday, July 22 2017, 03:28 PM - #Permalink
    Resolved
    0 votes
    Thanks so much for the hand-made setup.
    I changed the IPs to 10.50.100.x/255.255.255.0
    However, I think I figured out (my) confusion

    If ClearOS is going to deliver DHCP to the router, and it also is the gateway 10.50.100.1/255.255.255.0,
    how can 1 NIC be both DHCP and a static gateway 10.50.100.1?

    I have WAN as 69.207.191.178 (external DHCP)
    LAN is 10.50.100.1 (static)
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 22 2017, 03:46 PM - #Permalink
    Resolved
    0 votes
    A DHCP server hands out IP addresses. A DHCP client receives its address from a DHCP Server.

    The LAN should be configured as Static. Configuring it as DHCP means it gets its address by DHCP which is not what you want. Separately you configure you LAN NIC to be a DHCP server (Webconfig > Network > Infrastructure > DHCP Server).

    Does this help?
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Saturday, July 22 2017, 04:17 PM - #Permalink
    Resolved
    0 votes
    Yes, that helps.

    However, I can not get to the webconfig. Is there a way to do it on the ClearOS box?

    Or just connect directly to LAN port with cable (with a laptop)?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, July 22 2017, 04:40 PM - #Permalink
    Resolved
    0 votes
    Just directly connect the laptop to the ClearOS LAN (or via the router LAN). You will probably have to give the laptop a static IP on the same subnet as the LAN. On Windows, go to the Control Panel > Network and Sharing Centre > Connections > Properties > Internet Protocol Version 4 (TCP/IPv4) (double-click or properties) > Use the Following IP Address. I'm sure there are easier ways in!

    I can't remember if it can be done easily from the console. There is a really ugly way, which you can try if this does not work.

    [edit]
    Just checked. There is no easy way from the console
    [/edit]
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Wednesday, July 26 2017, 12:29 PM - #Permalink
    Resolved
    0 votes
    I'm confused as well (why the NICs have different ips)

    network.conf
    ----------------------------------
    # Network mode
    MODE="gateway"

    # Network interface roles
    EXTIF="enp0s7 eth0"
    LANIF="enp1s6"
    DMZIF=""
    HOTIF=""

    # Domain and Internet Hostname
    DEFAULT_DOMAIN="taco.com"
    INTERNET_HOSTNAME="localhost.localdomain"

    # Extra LANS
    EXTRALANS=""

    # ISP Maximum Speeds
    ENP0S7_MAX_DOWNSTREAM=0
    ENP0S7_MAX_UPSTREAM=0
    ENP1S6_MAX_DOWNSTREAM=0
    ENP1S6_MAX_UPSTREAM=0

    ifconfig
    -------------------------------------------------------
    enp1s6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 10.50.100.1 netmask 255.255.255.0 broadcast 10.50.100.255
    inet6 fe80::68d:39ff:fe40:1266 prefixlen 64 scopeid 0x20<link>
    ether 04:8d:39:40:12:66 txqueuelen 1000 (Ethernet)
    RX packets 5254 bytes 2007101 (1.9 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 23323 bytes 4345843 (4.1 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 0 (Local Loopback)
    RX packets 123234 bytes 78185428 (74.5 MiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 123234 bytes 78185428 (74.5 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    (These are pulled via a laptop - Wired - connected to ClearOS, Wireless to the Internet, so ClearOS does not have any internet)
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Wednesday, July 26 2017, 03:09 AM - #Permalink
    Resolved
    0 votes
    OK, so I got in. Looks like it is already setup for DHCP.
    Perhaps I need a real hostname for it to 'work'?
    enp1s6 is my static LAN 10.50.100.1/255.255.255.0
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 26 2017, 01:12 PM - #Permalink
    Resolved
    0 votes
    So ClearOS is showing only one NIC so it can't be run in gateway mode, however a single NIC has to be configured as external. If it is plugged into a LAN 10.50.100.1/24 so the external gateway device is somewhere in the same subnet, then in IP settings, either the NIC should be configured as DHCP if you have another DHCP server running on that subnet or as static with a unique IP on that subnet with its gateway set to your gateway device's LAN IP. Make sure the DHCP server is disabled. If there is no other DHCP server on your LAN, configure the NIC as static and you can enable DHCP Server. The DHCP server should be configured with a gateway of the LAN IP of your gateway device.

    If you change all these configurations, you may find you have to put ClearOS into standalone mode as it does not have a second LAN NIC.

    In /etc/clearos/network.conf you should end up with EXTIF set to enp1s6 and LANIF empty.

    I think you've been trying to set the box in gateway mode in anticipation of getting your ClearOS LAN NIC, but a lot of what was said won't work unless you can get ClearOS into a functioning gateway.
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Friday, July 28 2017, 03:03 AM - #Permalink
    Resolved
    0 votes
    Nick,
    Thanks for hanging in there with me.
    I'm confused. What do you mean by "ClearOS LAN NIC"?
    I have three NICs on this box. Is there a proprietary one for ClearOS?
    The reply is currently minimized Show
  • Accepted Answer

    Friday, July 28 2017, 07:20 AM - #Permalink
    Resolved
    0 votes
    If you have three NIC's then there is another problem as only one is showing in the output of "ifconfig". Did you edit your output or is there another issue?
    The reply is currently minimized Show
  • Accepted Answer

    John F
    John F
    Offline
    Saturday, July 29 2017, 04:21 AM - #Permalink
    Resolved
    0 votes
    Looks like the DHCP server was messing me up. I deleted it, and reinitialized it.
    Then setup the external to static, wala - everything is working perfectly.

    Now that it is all setup, excited to see what it can do.

    Thanks for the help :)
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 26 2017, 11:43 AM - #Permalink
    Resolved
    -1 votes
    I am completely confused now. You have said your LAN is 10.50.100.1/255.255.255.0 but this does not show on either of your screenshots. From your screenshots, your ClearOS WAN is probably 69.207.0.? and your ClearOS LAN is probably 192.168.1.0/24 so I don't know where 10.50.100.1/255.255.255.0 is.

    On your WAN you do not want a DHCP server configured.

    What is the output of "ifconfig", the contents of /etc/clearos/network.conf and can you post a shot if the Network > IP Settings page?

    Can you also sketch you set up in a similar manner as I did?
    The reply is currently minimized Show
Your Reply