How to access internet and run apt-get through a middle server?Not able to connect to local networkCompletely...
How can I play a serial killer in a party of good PCs?
What language shall they sing in?
Why did the villain in the first Men in Black movie care about Earth's Cockroaches?
Eww, those bytes are gross
What game did these black and yellow dice come from?
Website seeing my Facebook data?
How to deal with possible delayed baggage?
Why avoid shared user accounts?
Not a Long-Winded Riddle
How do you funnel food off a cutting board?
Does a paladin have to announce that they're using Divine Smite before attacking?
Difference in casting float to int, 32-bit C
microtype error with lualatex: "attempt to call field warning a nil value"
Is there any risk in sharing info about technologies and products we use with a supplier?
Boss asked me to sign a resignation paper without a date on it along with my new contract
Separate environment for personal and development use under macOS
Hosting images in SFMC - is it a good idea?
Why is 'diphthong' pronounced the way it is?
How do you voice extended chords?
Calculate of total length of edges in Voronoi diagram
After checking in online, how do I know whether I need to go show my passport at airport check-in?
Why does magnet wire need to be insulated?
What senses are available to a corpse subjected to a Speak with Dead spell?
How would an AI self awareness kill switch work?
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
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
do you havesshaccess to that server?
– RoVo
5 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
5 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
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 5 hours ago
Tran Ngu DangTran Ngu Dang
1263
1263
New contributor
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Tran Ngu Dang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
do you havesshaccess to that server?
– RoVo
5 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
5 hours ago
add a comment |
do you havesshaccess to that server?
– RoVo
5 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
5 hours ago
do you have
ssh access to that server?– RoVo
5 hours ago
do you have
ssh access to that server?– RoVo
5 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
5 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
5 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::socks::Proxy "socks5://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
3 hours 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
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
sorry, the line inapt.confwas wrong, I edited that. Please try again.
– RoVo
2 hours ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 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
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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::socks::Proxy "socks5://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
3 hours 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
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
sorry, the line inapt.confwas wrong, I edited that. Please try again.
– RoVo
2 hours ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 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::socks::Proxy "socks5://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
3 hours 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
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
sorry, the line inapt.confwas wrong, I edited that. Please try again.
– RoVo
2 hours ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 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::socks::Proxy "socks5://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::socks::Proxy "socks5://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 2 hours ago
answered 4 hours ago
RoVoRoVo
7,4341841
7,4341841
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
3 hours 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
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
sorry, the line inapt.confwas wrong, I edited that. Please try again.
– RoVo
2 hours ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 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
3 hours 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
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
sorry, the line inapt.confwas wrong, I edited that. Please try again.
– RoVo
2 hours ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 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
3 hours 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
3 hours 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
3 hours 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
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
Do i need to setup the remote server as a proxy server ?
– Tran Ngu Dang
3 hours ago
sorry, the line in
apt.conf was wrong, I edited that. Please try again.– RoVo
2 hours ago
sorry, the line in
apt.conf was wrong, I edited that. Please try again.– RoVo
2 hours ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 mins ago
Thank you. Now i get a Temporary failure resolving 'ports.ubuntu.com' error. Look like a DNS problem. Should I install a local DNS server or do you have any suggesstion ?
– Tran Ngu Dang
32 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
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 4 hours ago
terdon♦
66.4k12138221
66.4k12138221
New contributor
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 5 hours ago
AlpyAlpy
1303
1303
New contributor
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Alpy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
sshaccess to that server?– RoVo
5 hours ago
yes. i can run ssh root@10.0.0.1 and access the public server
– Tran Ngu Dang
5 hours ago