LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2018, 05:47 AM   #1
sysmicuser
Member
 
Registered: Mar 2010
Posts: 389

Rep: Reputation: 0
Anyway to expose my private IP as public ip on Internet?


Hello Gurus,

I have installed Jenkins on my CentOS 7 and wanted to do Continuous Integration with GIT.

Git webhook works well on my AWS server as the url I provide to GIT has Public IP.

Unfortunately, in my lab, CentOS has IP of 192.168.1.55 hence Git is not able to contact to the server.

My question is there a way to change private IP to Public Ip for Jenkins and Git integration would work for my home lab?

Btw, I did "NAT" configuration as well but I still get same IP 192.168.1.55

Note, port 8080 is opened in my home lab.

Any guidance would be sincerely appreciated.

Many Thanks
 
Old 08-11-2018, 05:54 AM   #2
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 620

Rep: Reputation: 173Reputation: 173
You seem to be confused about IP's.
You always have both a public and private IP. 192.168.1.* are common private IPs. You will also have a public IP.

Try a command such as
Code:
curl ipinfo.io/ip
to get your public ip


EDIT: I suppose always isn't true if you have an IPv6 ISP

Last edited by TheEzekielProject; 08-11-2018 at 05:57 AM.
 
Old 08-11-2018, 06:43 AM   #3
sysmicuser
Member
 
Registered: Mar 2010
Posts: 389

Original Poster
Rep: Reputation: 0
Hi there,

Thanks for that, I got my public IP.

Now the next challenge is Jenkins is accessible on Private IP but not on Public IP!?

I accessed it the same way "http://<Public IP>:8080" but no response, I did the same URL on Linux server and got the message, connection refused. What is the likely the issue?

Can I access my application only on One IP that Private IP or Public Ip but not on both?

Kindly guide me

Thank you
 
Old 08-11-2018, 06:55 AM   #4
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: Devuan+lxde
Posts: 620

Rep: Reputation: 173Reputation: 173
You would probably need to allow the port access through your router firewall.

But there are security implications to this. You will need to make sure you take steps to secure the connection.
 
Old 08-11-2018, 07:14 AM   #5
jmgibson1981
Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Ubuntu LTS
Posts: 242

Rep: Reputation: Disabled
Keep in mind as well that unless you have a static ip from your isp, it may change from time to time breaking your connection.
 
Old 08-11-2018, 08:41 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro
Posts: 6,439

Rep: Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267Reputation: 1267
if you're using a home router you will (should) be able to give yourself a static IP to get out.
 
Old 08-11-2018, 07:47 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 13,815
Blog Entries: 24

Rep: Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682Reputation: 3682
You can use a dynamic DNS provider such as noip.com. You should also make sure you properly secure your router.

Check your ISPs terms of service. In the USA, at least, most ISPs prohibit public-facing servers unless you have at least a business level account.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: A Public-Private Partnership for Gigabit Innovation and Internet Health LXer Syndicated Linux News 0 03-14-2017 10:02 AM
LXer: OpenSSH patches information leak that could expose private SSH keys LXer Syndicated Linux News 0 01-19-2016 05:42 AM
LXer: OpenSSH vulnerability could expose private credentials LXer Syndicated Linux News 1 01-15-2016 10:49 AM
Public Access of Internet using Private IP manas484 Linux - Security 1 01-17-2006 05:09 AM
public vs private ip emailssent Linux - Networking 2 09-28-2004 02:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration