How to access internet and run apt-get through a middle server?Not able to connect to local networkCompletely...
Possible issue with my W4 and tax return
Crack the bank account's password!
Does an Eldritch Knight's Weapon Bond protect him from losing his weapon to a Telekinesis spell?
Taking headphones when quitting job
What's the oldest plausible frozen specimen for a Jurassic Park style story-line?
Does the US government have any planning in place to ensure there's no shortages of food, fuel, steel and other commodities?
What game did these black and yellow dice come from?
Why is 'diphthong' pronounced the way it is?
Square Root Distance from Integers
Why didn't Tom Riddle take the presence of Fawkes and the Sorting Hat as more of a threat?
Potential client has a problematic employee I can't work with
Not a Long-Winded Riddle
Why does magnet wire need to be insulated?
How is it possible that the folder is there yet isnt in the same time?
Is there a file that always exists and a 'normal' user can't lstat it?
How vim overwrites readonly mode?
Is a new boolean field better than null reference when a value can be meaningfully absent?
Microtypography protrusion with Polish quotation marks
Does Skippy chunky peanut butter contain trans fat?
What species should be used for storage of human minds?
Stuck on a Geometry Puzzle
Confusion over units in force equation?
Why avoid shared user accounts?
Can we "borrow" our answers to populate our own websites?
How to access internet and run apt-get through a middle server?
Not able to connect to local networkCompletely disappeared WirelessUbuntu server can access internet but cannot ping systems in the LANConflict between two network interfaces eth0 and eth114.04 no internet connection when I up the bridge interface (for LXC container)I can't connect to internet through wired connectionUbuntu 14.04 Ethernet Connectivity Issue on startupDual NIC not workingNo pings no package locations on serverVPN connects but no remote LAN access
I have a machine running ubuntu 16.04. The machine can only access 1 remote server (also running ubuntu). The remote server has full access to internet though.
root@localmachine:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr 02:1e:10:1f:00:00
inet addr:10.1.0.94 Bcast:10.1.0.95 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4366027 errors:0 dropped:0 overruns:0 frame:0
TX packets:1813925 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:669835698 (669.8 MB) TX bytes:265999026 (265.9 MB)
root@localmachine:~# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=62 time=58.4 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=62 time=59.2 ms
I need to install some package on this local machine via apt-get.
Is there a way to access internet throught the public server at 10.0.0.1 ?
Thank you for your reply.
networking server ssh
New contributor
add a comment |
I have a machine running ubuntu 16.04. The machine can only access 1 remote server (also running ubuntu). The remote server has full access to internet though.
root@localmachine:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr 02:1e:10:1f:00:00
inet addr:10.1.0.94 Bcast:10.1.0.95 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4366027 errors:0 dropped:0 overruns:0 frame:0
TX packets:1813925 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:669835698 (669.8 MB) TX bytes:265999026 (265.9 MB)
root@localmachine:~# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=62 time=58.4 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=62 time=59.2 ms
I need to install some package on this local machine via apt-get.
Is there a way to access internet throught the public server at 10.0.0.1 ?
Thank you for your reply.
networking server ssh
New contributor
do you havessh
access to that server?
– RoVo
2 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
2 hours ago
add a comment |
I have a machine running ubuntu 16.04. The machine can only access 1 remote server (also running ubuntu). The remote server has full access to internet though.
root@localmachine:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr 02:1e:10:1f:00:00
inet addr:10.1.0.94 Bcast:10.1.0.95 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4366027 errors:0 dropped:0 overruns:0 frame:0
TX packets:1813925 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:669835698 (669.8 MB) TX bytes:265999026 (265.9 MB)
root@localmachine:~# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=62 time=58.4 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=62 time=59.2 ms
I need to install some package on this local machine via apt-get.
Is there a way to access internet throught the public server at 10.0.0.1 ?
Thank you for your reply.
networking server ssh
New contributor
I have a machine running ubuntu 16.04. The machine can only access 1 remote server (also running ubuntu). The remote server has full access to internet though.
root@localmachine:~# ifconfig usb0
usb0 Link encap:Ethernet HWaddr 02:1e:10:1f:00:00
inet addr:10.1.0.94 Bcast:10.1.0.95 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4366027 errors:0 dropped:0 overruns:0 frame:0
TX packets:1813925 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:669835698 (669.8 MB) TX bytes:265999026 (265.9 MB)
root@localmachine:~# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=62 time=58.4 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=62 time=59.2 ms
I need to install some package on this local machine via apt-get.
Is there a way to access internet throught the public server at 10.0.0.1 ?
Thank you for your reply.
networking server ssh
networking server ssh
New contributor
New contributor
New contributor
asked 2 hours ago
Tran Ngu DangTran Ngu Dang
1063
1063
New contributor
New contributor
do you havessh
access to that server?
– RoVo
2 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
2 hours ago
add a comment |
do you havessh
access to that server?
– RoVo
2 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
2 hours ago
do you have
ssh
access to that server?– RoVo
2 hours ago
do you have
ssh
access to that server?– RoVo
2 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
2 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
2 hours ago
add a comment |
2 Answers
2
active
oldest
votes
Open a terminal and start ssh
dynamic port forwarding:
ssh -D 1080 root@10.0.0.1
This will start a socks proxy on your computer on port 1080.
Add this line to your /etc/apt/apt.conf
file:
Acquire::http::Proxy "localhost:1080";
Then you can run your apt update
/ apt install
commands. When you're done, you can close the ssh
connection and revert the changes in apt.conf
.
You can also tell your Browser or other applications to use that Socks proxy and access the Internet.
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
add a comment |
The easiest way would be that you set up a proxy server on the middle server/gateway and set up your apt to use this proxy:
sudo vi /etc/apt/apt.conf.d/proxy.conf
And add this line:
Acquire::http::Proxy "http://user:password@proxy.server:port/";
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Tran Ngu Dang is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1121350%2fhow-to-access-internet-and-run-apt-get-through-a-middle-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Open a terminal and start ssh
dynamic port forwarding:
ssh -D 1080 root@10.0.0.1
This will start a socks proxy on your computer on port 1080.
Add this line to your /etc/apt/apt.conf
file:
Acquire::http::Proxy "localhost:1080";
Then you can run your apt update
/ apt install
commands. When you're done, you can close the ssh
connection and revert the changes in apt.conf
.
You can also tell your Browser or other applications to use that Socks proxy and access the Internet.
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
add a comment |
Open a terminal and start ssh
dynamic port forwarding:
ssh -D 1080 root@10.0.0.1
This will start a socks proxy on your computer on port 1080.
Add this line to your /etc/apt/apt.conf
file:
Acquire::http::Proxy "localhost:1080";
Then you can run your apt update
/ apt install
commands. When you're done, you can close the ssh
connection and revert the changes in apt.conf
.
You can also tell your Browser or other applications to use that Socks proxy and access the Internet.
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
add a comment |
Open a terminal and start ssh
dynamic port forwarding:
ssh -D 1080 root@10.0.0.1
This will start a socks proxy on your computer on port 1080.
Add this line to your /etc/apt/apt.conf
file:
Acquire::http::Proxy "localhost:1080";
Then you can run your apt update
/ apt install
commands. When you're done, you can close the ssh
connection and revert the changes in apt.conf
.
You can also tell your Browser or other applications to use that Socks proxy and access the Internet.
Open a terminal and start ssh
dynamic port forwarding:
ssh -D 1080 root@10.0.0.1
This will start a socks proxy on your computer on port 1080.
Add this line to your /etc/apt/apt.conf
file:
Acquire::http::Proxy "localhost:1080";
Then you can run your apt update
/ apt install
commands. When you're done, you can close the ssh
connection and revert the changes in apt.conf
.
You can also tell your Browser or other applications to use that Socks proxy and access the Internet.
edited 1 hour ago
answered 1 hour ago
RoVoRoVo
7,3861841
7,3861841
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
add a comment |
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
I run the command and get this error: Failed to fetch ports.ubuntu.com/ubuntu-ports/pool/universe/a/autossh/… Cannot initiate the connection to 1080:80 (0.0.4.56). - connect (22: Invalid argument)
– Tran Ngu Dang
56 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
the dynamic port forwarding seems to be correct: tcp 0 0 127.0.0.1:1080 0.0.0.0:* LISTEN 21096/ssh
– Tran Ngu Dang
55 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
54 mins ago
add a comment |
The easiest way would be that you set up a proxy server on the middle server/gateway and set up your apt to use this proxy:
sudo vi /etc/apt/apt.conf.d/proxy.conf
And add this line:
Acquire::http::Proxy "http://user:password@proxy.server:port/";
New contributor
add a comment |
The easiest way would be that you set up a proxy server on the middle server/gateway and set up your apt to use this proxy:
sudo vi /etc/apt/apt.conf.d/proxy.conf
And add this line:
Acquire::http::Proxy "http://user:password@proxy.server:port/";
New contributor
add a comment |
The easiest way would be that you set up a proxy server on the middle server/gateway and set up your apt to use this proxy:
sudo vi /etc/apt/apt.conf.d/proxy.conf
And add this line:
Acquire::http::Proxy "http://user:password@proxy.server:port/";
New contributor
The easiest way would be that you set up a proxy server on the middle server/gateway and set up your apt to use this proxy:
sudo vi /etc/apt/apt.conf.d/proxy.conf
And add this line:
Acquire::http::Proxy "http://user:password@proxy.server:port/";
New contributor
edited 1 hour ago
terdon♦
66.4k12138221
66.4k12138221
New contributor
answered 2 hours ago
AlpyAlpy
1013
1013
New contributor
New contributor
add a comment |
add a comment |
Tran Ngu Dang is a new contributor. Be nice, and check out our Code of Conduct.
Tran Ngu Dang is a new contributor. Be nice, and check out our Code of Conduct.
Tran Ngu Dang is a new contributor. Be nice, and check out our Code of Conduct.
Tran Ngu Dang is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1121350%2fhow-to-access-internet-and-run-apt-get-through-a-middle-server%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
do you have
ssh
access to that server?– RoVo
2 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
2 hours ago