I've installed Jenkins on my mac via homebrew.
I've real ip.
How can i have access outside local network/mac? For example from other location?
You can use portforwarding on your router if you have a fixed IP from your isp
where you forward every connection from externalip:portnumber to internalip:portnumber.
Where internal ip is the ip of your mac and the portnumber is the portnumber to which your jenkins listens.
If you dont have a fixed ip you would need to use a dns provider like http://www.noip.com/
Related
I have created a VM instance with windows OS (windows-server-2019-dc-v20200211) in Google cloud.Established RDP connection and installed Jenkins on the VM, but how can I access it from other networks using the VM's external ip?
Could someone help me on this!!
Note: I want to install Jenkins in windows server and not on Linux.
I'll suggest you should check the following:
First, make sure your local firewall on windows server is enabled and allows connections on port 8080. Secondly, Network ACL for both incoming traffic on TCP 8080 and outcoming traffic on TCP port 8080 should be allowed.
Also check some of these stackoverflow use cases for more help: [1]https://superuser.com/questions/1212645/cannot-expose-jenkins-externally [2]https://apple.stackexchange.com/questions/31376/how-can-i-open-port-8080-of-mac-os-x-lion [3] Jenkins server is not accessible by host name (ip address)
I am trying to use docker behind corporate firewall.
I would like to force docker to use system Proxy, but this option is not available. How can I make docker to system Proxy.
I've written a blog post about using the weird DummyDesperatePoitras virtual switch as an anchor for CNTLM, and that resolves some of the problems I mentioned here (having to change the proxy address for Docker every time your IP changes, among other things):
http://mandie.net/2017/12/10/docker-for-windows-behind-a-corporate-web-proxy-tips-and-tricks/
As of November 2017, this feature was still not implemented in Docker for Windows: https://github.com/docker/for-win/issues/589
The best solution I've found is CNTLM, but I'm not delighted with it, because:
1) CNTLM has not been updated in 5 years
2) You have to set the proxy IP in the Docker GUI, making it rather automation-resistant. The Docker for Windows GUI reads the proxy settings from the MobyLinux VM, not from the Windows registry, a config file or Windows environment variables. Setting HTTP_PROXY and HTTPS_PROXY in Windows has absolutely no effect on Docker. I've not found any way of setting the proxy value programmatically; the MobyLinux VM doesn't accept ssh connections. If anyone ever finds a way to do this from a command line or script, I'd love to know.
3) Setting the proxy IP to 127.0.0.1 won't work, because that will get the virtual machine that Docker is really running on to try its own interface, not the one on the host PC running CNTLM. I have also tried the DockerNAT interface IP, 10.0.75.1, with no success.
4) This means that the proxy IP needs to be the current IP address of your active external network interface. If you move around buildings a lot, you need to check this every time you want to use Docker.
Set CNTLM to listen on 0.0.0.0 3128, not just 3128 or 127.0.0.1 3128. This will save you the trouble of updating this IP address every time your PC gets a new IP address. Just having the port number will keep traffic from the VM running Docker from being "heard".
Calculate the NTLMv2 hash and store that in the config file instead of your username and password. This will be different for every PC and user account, so don't share your unredacted config file with another PC unless you want to get locked out. You will need to update this stored hash when you next change your Windows password.
Restart the cntlm Windows service after any changes to its config file.
Run ipconfig in cmd.exe or PowerShell to find your current IP address. If you're using corporate VPN, use the IP address of the WiFi or Ethernet adapter, not the VPN.
Type http://ipfromipconfig:3128/ into the "Web Server (HTTP)" box. Make sure the checkbox "Use same for both" is checked.
Using CNTLM automates working behind proxy. It allows us to specify everywhere IP address without any credentials, so security is better and whenever we change password we only have to do it in one place, we can also specify URLs that should not be proxied.
Since 18.03 Docker version, there is available special DNS name: host.docker.internal. That allows to connect to the host machine from Docker containers. Now, when we setup our CNTLM proxy in cntlm.ini to make it listen on 0.0.0.0:3128:
Listen 0.0.0.0:3128
Then we can specify in Docker settings proxy using host.docker.internal:3128 address, which will be translated to appropriate and current local address of our machine.
you can set up two environment variables http_proxy and https_proxy
http_proxy with value http://username:password#proxyIp:proxyport
for example, in my case it was
http://venkat_krish:password#something.ad.somthing.com:80
you can use the same for https proxy
Note:
If you have any special characters apart from _ & . in the username or password
you have to encode the url. follow this link for url encoding https://grox.net/utils/encoding.html
For example if your password is abc#123, then it will be written as abc%40123
I have an Ubuntu VM (with a Varnish Cache) running in VirtualBox on my local computer. When I'm at home the ip address of my computer is 192.168.178.34. I use the network bridge to connect the VM with my computer. The ip of the VM is then 192.168.178.38. That allows me to reach the cache-server e.g. like that: http://192.168.178.38:6081/index.html
The problem is, i want that this URI is static. My goal is to share the vm with somebody and make a documentation about how to use the cache-server. Therefore it would be great if the ip adress would be always the same, even if the vm will be started in a VirtualBox on a different computer.
Is there a way to set a fixed ip address for the vm, regardless of the host computer?
Thanks a lot!
martin.martin
You can set up a host-only network adapter, which uses the subnet 192.168.56.0/24 by default. Inside the VM, you can set a static IP address.
I'm running VirtualBox on a ubuntu (host), the VM i'm using is fedora (guest). VirtualBox is setup to use the NAT network adapter, and I'm able to get to the internet.
i use Port Forwarding to access ssh and the rails web server
port Forwarding Rules
<NAT>
<DNS pass-domain="true" use-proxy="false" use-host-resolver="false"/>
<Alias logging="false" proxy-only="false" use-same-ports="false"/>
<Forwarding name="Rule 1" proto="1" hostport="5679" guestport="22"/>
<Forwarding name="Rule 2" proto="1" hostport="3080" guestport="3000"/>
</NAT>
now i can access internet on guest machine , and i can logging through ssh
but i cannot access the Rails web server on port 3080
i tried :
localhost:3080
10.0.2.15:3080 #the guest IP
what i can do all i need is SSH and internet connection and open the web site i host on gust machine by Browser in host machine
thanks
Just a stab in the dark here but this might be your issue...
When you provision a new Linux Virtual Machine in VirtualBox, the Network settings for that VM are set to 'NAT'. This results in your new VM being assigned a 10.x.x.x address.
Change this setting to Bridged mode, which will assign your VM an address within the same subnet as your host (most likely 192.168.x.x).
Try to connect to the site running on your host.
If you're still not able to access the site running on localhost, confirm the app isn't blocking connections from your new VM. Add a rule in to your access list (possible iptables) permitting tcp port 80 traffic from your VM's address (found using ifconfig).
Happy hunting!
In your VB you have to set network only with host. It is in preferences->network.
Then you can access your virtual machine via 192.168.56.101 from ubuntu. Port forwarding set on this network card. List it with ifconfig. I recommend to use iptables for port redirects.
I am running a Debian VMware virtual machine on Windows7. I am developing a Rails web app on the virtual machine, I would like to access the app (localhost:3000) from outside the vm, i.e from windows.
Is there a way to do that?
Thanks.
This really depends on how your virtual network adapters are setup between the guest and host. Assuming you have not changed anything, they will be bridged by default. In your VM from a terminal run:
ifconfig
This will give you the IPv4 address (generally a 10.x.x.x) of the virtual interface which you should be able to access from your Windows host. You should be able to put that into your browser on the host with the :3000 port and access it.
If you have modified the network adapters, things may be different. For instance, setting it up as a NAT will give it an address on your physical network; i.e. 192.x.x.x, but accessing it the same. A host only netowork, would also most likely provide a 10.x.x.x address, but should also provide access.