1

I added the following line to /etc/network/interfaces

auto ens7iface ens7 inet static address 192.168.1.2 netmask 255.255.255.0

when I do systemctl restart networking I get

Job for networking.service failed because the control process exited with error code. See "systemctl status networking.service" and "journalctl -xe" for details.

I am trying to add a internal IP address to my ubuntu 16.04 VPS

m27
  • 427
  • 1
  • 5
  • 16
  • 3
    If the VPS as a proxy server is going to be used externally from your network, then there is no Private IPv4 address. Most VPSes don't have private networking, anyways; you'd be better off setting up a VPN and VPNing to the VPS so all your data flows through it rather than setting up a squid proxy, depending on your use case. – Thomas Ward Mar 08 '19 at 14:36
  • 1
    Nano is a text editor. You type nano followed by the path and name of the file you want to edit. Are you logged on to the VPS as root or yourself? Please edit your question and add this information. – user68186 Mar 08 '19 at 14:40
  • Thomas Ward, I could probably do that, but I really need to set it up as a proxy rather than VPN, I only need my browser to have the IP of the VPS, not the whole traffic. – m27 Mar 08 '19 at 15:11
  • User68186, I edited the question, and yes, I am logged in as root – m27 Mar 08 '19 at 15:12
  • After you open the file in question in nano, you will see the text in the file. Scroll down to the bottom and add the lines of text. Exit the nano editor by pressing CTRL+X. Nano will ask if you want to save the changes. Tyoe Y. Hit enter again to replace the old file. Let me know if this is what you wanted. I will write a full answer, which you can accept as correct. That will help others. – user68186 Mar 08 '19 at 15:19
  • When I said scroLL down, I meant the down arrow key . – user68186 Mar 08 '19 at 15:27
  • Thank you for your help, I was able to edit the file, now it looks like this: https://i.snag.gy/3Gh4pr.jpg

    When I do sudo ifup eth1 command I get this:

    https://i.snag.gy/vaSDZY.jpg

    – m27 Mar 08 '19 at 15:28
  • Please update your question with the new information. Please copy and paste terminal output in the question, don't put screenshots of text output in the question. – user68186 Mar 08 '19 at 17:25
  • I edited the question – m27 Mar 08 '19 at 18:54
  • Hello , @shiu'sho, probably for your needs you would be happy to use ssh connection with dynamic port forwarding, as it is described here, instead of setup an entire proxy server. – pa4080 Mar 08 '19 at 19:13

0 Answers0