LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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: 458

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: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
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: 458

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: arch
Posts: 668

Rep: Reputation: 190Reputation: 190
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
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
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: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,323
Blog Entries: 28

Rep: Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141Reputation: 6141
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.
 
Old 11-07-2018, 05:44 PM   #8
sysmicuser
Member
 
Registered: Mar 2010
Posts: 458

Original Poster
Rep: Reputation: 0
Many thanks All!
 
  


Reply



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 03:00 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
Open Source Consulting | Domain Registration