LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-01-2014, 06:24 AM   #1
cylent77
LQ Newbie
 
Registered: Jan 2007
Posts: 13

Rep: Reputation: 0
ubuntu server port forwarding to private ip


I realize this maybe simple for some but my research for a solution is getting me nowhere on this.

I am basically trying to do something so simple thats becoming a difficult task for me ... and yes i was a redhat certified technician a while back but i just never studied iptables and its drama.

What i am trying to do is something silly. use my vps as a gateway and have it forward traffic on incoming ports to my private computer at home.

so traffic that would come in on port 9003 (for example) to my VPS ip would be forwarded to my home ip via what i have setup which is the openvpn server.

on the openvpn server i've given myself a static ip of 172.27.230.2

I want my vps public ip to be "mask" so to speak.

So then traffic that comes to my pubip:9003 gets redirected to 172.27.230.2

in ubuntu server i tried to use ufw (ubuntus firewall software) to first open the port then i tried a nat redirect rule.

i then used a tcp/ip program on my windows machine called Listen.exe .. this is nothing more than a program that listens on a specified port .. i then used port checking utility online to verify my work.

yet all the time the ports are closed and the traffic is not coming through.

i checked on ubuntu with netstat and i see the port 0.0.0.0:9003 is open.

again. i realize this is outside the scope of your work but i am desperate and cant get this working.

please advise.
 
Old 03-01-2014, 12:04 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Please post information:
Openvpn config
Network configs
Routing tables
Firewall config - on vps & private computer
NAT rule
 
  


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
Port number used by server when using dynamic port forwarding in SSH? kreeder Linux - Networking 4 11-21-2011 02:07 PM
Ubuntu Server UFW Port Forwarding jemate18 Linux - Server 1 10-23-2011 09:39 AM
easy port forwarding for ubuntu wanas Linux - Newbie 3 11-10-2008 07:03 AM
Port forwarding from Ubuntu 5.10 server czk101 Linux - Networking 2 01-27-2006 08:16 PM
ubuntu port forwarding inspiredbymetal Linux - Newbie 1 09-25-2005 12:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:26 PM.

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