Networking

A basic understanding of networking is important for anyone managing a server. Not only is it essential for getting your services online and running smoothly, it also gives you the insight needed to diagnose problems.

Networking subscription active
You will receive email notifications for new publications on Networking.
912 Results
  • Question

    How to ping Docker container from another container by name?

    Hi all, I want to be able to ping or basically access a running docker container from another container by simply using the docker name rather than an IP address. I've tried a few guides but I could not get it working...
    Accepted Answer: Hello, Yes this now comes more or less out of the box with Docker Networks, so what you need to do is: Create two containers: docker run -d --name <^>web1<^> -p 8001:80 eboraas/apache-php docker run -d --name <^>web...
    1 By bitmap Docker Linux Basics Networking Ubuntu
  • Question

    How do I forward client IP instead of proxy IP in Nginx Reverse Proxy?

    Overview I have a setup that looks like this: * Nginx Reverse Proxy with a Floating IP * Reverse Proxy is configured to forward requests from users to a 3rd party SaaS application, BigCommerce which then handles the r...
    Accepted Answer: Hi @cvanorman I think that what you have in place is correct in terms of the 4 headers that you've configured already. What is the output of the Nginx access logs? Are you seeing the correct IP there?
    2 By cvanorman Nginx Ubuntu 18.04 Networking
  • Question

    Private IP is not created for custom image

    I am using the API to spin up a droplet that uses a custom image. I have enabled private ip at the time of creation but no network is created in the droplet. I can see in the DigitalOcean control panel that private ne...
    Accepted Answer: The device itself is properly created ( ens4 ) so the missing piece is likely the integration of the metadata with the interface configuration. This is generally done with cloud-init, which should be aware of using th...
    1 By zboyet Custom Images Networking
  • Question

    Connection timing out through FTP and SSH, works in droplet console?

    Hey guys, I just recently had my droplet suspended because I was away on vacation and forgot to pay. Yesterday, I paid and got my droplet back online. However, I can't connect to it through SSH or FTP. In the FileZill...
    Accepted Answer: Ended up rebuilding droplet, can someone delete this
    1 By jhurst114 Networking
  • Question

    Domain IP in control panel does not match droplet IP

    I may not have set this up correctly from the start though everything seems to work properly: I have a website hosted elsewhere. I created a subdomain there and made an A record in my webhost CPanel pointing to my dr...
    Accepted Answer: Hi, @robbielink If the active DNS zone is not controlled through the DigitalOcean control panel (e.g you're not using DigitalOcean nameservers) then the IP address listed in the DNS section there is not taking any ef...
    1 By robbielink Networking Initial Server Setup
  • Question

    How to Install Subspace on Ubuntu server?

    Subspace (https://github.com/subspacecommunity/subspace) is a simple opensource WireGuard VPN server graphical user interface(GUI). You can install subspace directly on your server which would allow you to track and c...
    Accepted Answer: Prerequisites In order to complete this guide, you will first need to perform the following tasks on your Ubuntu 18.04 Droplet: Ubuntu 18.04 Droplet Create a sudo user and enable ufw. To set this up, you can follow ou...
    1 By bobbyiliev VPN Linux Basics Ubuntu Networking
  • Question

    How to setup domain and sub-domain to different hosting providers

    Hello, Current situation: My domain: www.example.com which is with 'BigRock', which has nameservers connection to the 'HostGator'. Now, I want to point www.blog.example.com sub-domain to 'DigitalOcean'. Expected outpu...
    Accepted Answer: Hello, @suchakmaulik179 If your domain name is using Hostgator's nameservers than all DNS changes need to be made from their control panel, because the active DNS zone is there. If you made DNS changes for your domai...
    1 By suchakmaulik179 WordPress DNS Networking Apache PHP
  • Question

    Best way for a new droplet to programmatically learn its IP address

    I am planning to create new droplets dynamically. They will register themselves by writing their IP address in a database. They are all going to be on a private network, so this will be the IP address of eth1 and ...
    Accepted Answer: Hi @RalphEJohnson, I remember needing something like this for a project a while ago, I basically did the following. It gives you the private IP address of the droplet. ip addr show eth1 | grep "inet\b" | awk '{print ...
    1 By RalphEJohnson Networking Ubuntu 18.04
  • Question

    Digital Ocean Firewall Port Forwarding

    Hello, I've managed to secure website I believe with the increasing support from Digital Oceans Firewall so the website is accessible, but doing this has shut off access to server access (SSH), including ports 2083, a...
    Accepted Answer: Hey @indigobsk, I don't think that this is yet possible with the DigitalOcean firewalls, but it sounds like a great idea, it'd be super useful! The best thing to do to get your voice heard regarding this would be to h...
    1 By indigobsk Networking WordPress CentOS
  • Question

    How do I change VPC

    I was wondering how I change my droplet from 1 VPC to another ?
    Accepted Answer: Hi @Graytech, You'll need to create another project in your Control area and move the droplet there. From there you should be able to configure another VPC. If you are not sure exactly how that works, I'll recommend ...
    1 By Graytech Networking
  • Question

    IP address worked but domain name does not

    Domain name is registered and DNS is pointed to DO as per tutorial. Created "A" record for fireball.design and www.fireball.design and *.fireball.design. Also created Nginx server block for fireball.design in /etc/ngi...
    Accepted Answer: Tried the Fail2ban stuff but nothing worked and even uninstalled it. Tried lots of other things. I give up 3 weeks later for a simple LEMP stack with Wordpress. One click garbage installs. Can somebody delete this wh...
    4 By AndreyPavlov DNS Initial Server Setup LEMP Networking Nginx PHP WordPress Ubuntu 18.04
  • Question

    No internet connection after command poweroff in Ubuntu 18.04 LAMP server

    I don't know why it happened . I just rebooted my droplet in order to make some maintenance and now no internet connection. I have a message which says network is unrecheable when I ping 8.8.8.8 and if I perform sudo ...
    Accepted Answer: Hello, @randomspider What happens when you execute ifconfig -a can you see the eth0 interface listed? If this one is not present then we will need to sort this out. I know that sometimes some packages can be uninstal...
    1 By randomspider Ubuntu 18.04 Networking
  • Question

    Setting up a database server on another droplet in VPC

    Hi. I am currently running database and web server on single droplet, but because of site traffic increase, I am planning to put database on separate droplet with enough RAM, but there are some questions: 1) I want my...
    Accepted Answer: Hi @xrjMaker, It's totally possible what you are aiming for and I believe if the traffic to your application is huge that it's a step in the right direction! Let's start with your questions. Private Networking is a re...
    1 By xrjMaker Scaling Networking Databases
  • Question

    Add droplet to VPC without downtime?

    Hi. With new VPC feature, can I add existing and running droplet to VPC network without shutting it down (and taking snapshot)? Probably via some manual commands? Thanks in advance.
    Accepted Answer: Hello, @xrjMaker You can't migrate Droplets between VPC networks directly, but you can recreate a Droplet using a snapshot. Snapshots are on-demand images of Droplets. You can create new Droplets based on snapshots t...
    1 By xrjMaker Networking
  • Question

    adding subdomain in apache virtual host

    I am trying to configure a subdomain: api.example.com (exapmle.com is replaced by my actual domain name) I already had virtual hosts set up with 2 sites: example.com and example.nl they both had separate directories a...
    Accepted Answer: @jop02 You are redirecting the traffic from http://api.example.com to https://api.example.com so you need to setup another virtual host for https://api.example.com where it listen on port 443 and uses a certificate f...
    1 By jop02 Apache DigitalOcean Networking Ubuntu Ubuntu 18.04
  • Question

    How do I set an FQDN?

    Hi, I'm trying to set my FQDN so that when I do hostname -f, it gives me my FQDN (like mx.example.com) instead of my hostname which I used to create my Droplet. I would appreciate any help. Thanks.
    Accepted Answer: Hello, @amirehmarwan I believe that there are 3 things that you need to do: 1 Use the following command: sudo hostnamectl set-hostname hostname 2 Update your hostname in your hosts file: vim /etc/hosts 3 Find the...
    1 By marwanamireh Ubuntu 18.04 Networking
  • Question

    Cannot connect to Postfix on port 587

    Hi there, I have installed Postfix on a droplet, and configured it to work on ports 25 and 587. I'm unable to make a connection remotely. If I do the following from the droplet itself: ``` telnet localhost 587 ``` I g...
    Accepted Answer: Hello, This sounds like that you might have a firewall on your Droplet. If this is the case you need to open port 587 for incoming and outgoing TCP connections, for example if you are using Ubuntu and if you have UFW ...
    1 By DigitalCarrot Networking
  • Question

    Can I be assured that the IPv4 address of my VPS will never change?

    Hello, Right now we are designing a product and I will be using DigitalOcean VPS for all the communication. I will be hard coding the IP address in the product. Can I be assured that my IPv4 address will not change? T...
    Accepted Answer: Hi there @Aerience, Yes, each Droplet comes with one static IPv4 address that should not change. However, I would strongly advise using a domain name rather than an IP. That way in case you need to switch the IP of yo...
    1 By Aerience Networking
  • Question

    No internet/connection after droplet reboot

    After rebooting Ubuntu 18.04 Droplet I couldn't access it via SSH. Then I realized that I don't receive any response when pinging its IP. I connected to my Droplet through DigitalOcean built-in terminal and tried to p...
    Accepted Answer: After almost two weeks since I raised this issue, I was finally able to resolve it. The problem occurred in the first place because different packages got uninstalled somehow when I rebooted. This includes cloud-init,...
    8 By lukasea17033bb7e7ecf80fc21 Networking Ubuntu 18.04
  • Question

    Intermittent connection refused with cURL on localhost only

    After updating my droplet running Ubuntu 17.10 a week ago I have been experiencing intermittent "Connection refused" errors when making requests to my API using cURL. After spending hours narrowing down the cause of t...
    Accepted Answer: I'll answer my own question for anyone else having the same issue. After days of trying to figure out what the issue was, a Stack Overflow answer on an unrelated topic pointed me in the right direction. I knew that wh...
    2 By chrisjonesio Networking API Development DNS Ubuntu