port-forwarding on firewall or via SSH

learn more… | top users | synonyms

10
votes
7answers
7k views

Loopback to forwarded Public IP address from local network - Hairpin NAT

This is a Canonical Question about Hairpin NAT (Loopback NAT). The generic form of this question is: We have a network with clients, a server, and a NAT Router. There is port forwarding on the ...
24
votes
3answers
19k views

iptables port redirect not working for localhost

I want to redirect all traffic from port 443 to the internal port 8080. I'm using this config for iptables: iptables -t nat -I PREROUTING --source 0/0 --destination 0/0 -p tcp ...
8
votes
2answers
678 views

SSH port forwarding

I want to connect to my computer(local) behind NAT through a public accessible server(public). On local: ssh -g -R 8000:localhost:22 user@public Then on public: ssh -p 8000 user@public But I ...
3
votes
2answers
2k views

Iptables port forwarding on OpenVZ CEntOS container

I am trying to setup a simple port forwarding on an OpenVZ container that is running CentOS 5.5. When I run a command I get errors. iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT ...
12
votes
8answers
15k views

Port forwarding on Linux without iptables?

I have a Linux VPS (virtuozzo) server and I need to setup port forwarding, but my hosting provider does not allow iptables-nat kernel modules so iptables -t nat - is not working. I'm looking for ...
5
votes
2answers
10k views

iptables: forward port 80 to port 8080

How can I port-forward port 80 internally to port 8080? My goal is to have a web app server (Glassfish) running on port 8080, but for the outside world to access it normally on port 80. This is ...
2
votes
2answers
4k views

Basic iptables NAT port forwarding

I have three machines: A local PC (public IP 1.2.3.4), an Ubuntu 10 Server box in a datacentre (eth0 on 5.6.7.8 public IP), and a third-party server hosting a website outside of my network (let's say ...
1
vote
2answers
10k views

Serial port forwarding over TCP/IP (linux server)

I am looking for a way to use a remote serial port on a linux machine over LAN. The machine is running ubuntu 10.04 and I have a arduino board connected to it, that I would like to be able to ...
13
votes
3answers
17k views

Forwarding ports to guests in libvirt / KVM

How can I forward ports on a server running libvirt/KVM to specified ports on VM's, when using NAT? For example, the host has a public IP of 1.2.3.4. I want to forward port 80 to 10.0.0.1 and port 22 ...
4
votes
1answer
5k views

port to subdomain

I have installed Hudson using apt-get, and the Hudson server is available on example.com:8080. For example.com I use standard port *:80 and some virtual hosts set up this way: # ...
2
votes
1answer
587 views

How come I can't redirect TCP ports on this wireless router?

I am configuring a router to redirect TCP port 5900 (yes, this is for VNC) to a specific IP address on the network. Here is what I have: From a local computer on the same network, I can telnet to ...
0
votes
2answers
126 views

Apache local verses external (domain)

I have an Apache server running on Ubuntu server 10, using Passenger for Ruby on Rails. I have configured my site under the sites-enabled directory of Apache and can hit the server with an internal ...
5
votes
10answers
10k views

Forward port to another Ip/port

I recently found out that my ISP disables port 135. I have a server and personal computer behind my router. A friend and I are working on a programming project and are running into some sql issues ...
1
vote
1answer
70 views

why port forwarding is not working in this setup?

I'm trying to setup a docker virtualization environment. This is a follow up of this question. I have a virtual eth0:0 interface, and I would like to forward it using iptables. The public, main IP ...
1
vote
2answers
3k views

Is there a way to forward a port based on subdomain? [duplicate]

Possible Duplicate: How to use DNS to redirect domain to specific port on my server Basically I want to have something like this: name1.mydomain.com:1234 -> my.internal.ip.address:10001 ...
0
votes
0answers
344 views

ssh reverse tunnel port forwarding connection fails

Updated: diagram http://s22.postimg.org/b2jfgawup/diagram_ssh_tunnel_a1.png I am able to do a reverse port forwarding through the PUTTY GUI with settings similar to below. once I apply this setting, ...
0
votes
1answer
569 views

NAT / Port Forwarding with iptables firewall [duplicate]

I've got the following setup: firewall (iptables) eth0 internal interface, 192.168.2.10 ppp0 external interface, public_ip (IP masquerading) server1 (192.168.2.11), service 1 (port 443) server2 ...
0
votes
1answer
254 views

SMTP traffic timing out on my server [closed]

My mail server is not getting or processing incoming e-mails. I recently changed my MX record to point to a different router on my network. I opened port 25 on the router and pointed it to my mail ...
19
votes
6answers
18k views

Why can't I access my CouchDB instance externally on Ubuntu 9.04 server?

Update: I got it working now. Jim Zajkowski's answer helped me detect that my /etc/init.d/couchdb reboot calls weren't actually rebooting the instance. After I manually killed the CouchDB processes ...
6
votes
1answer
802 views

Adding port forwardings programmatically on a ControlMaster SSH session

I just found out about the ControlMaster/ControlPath feature of OpenSSH, which allows you to use a single SSH connection to run multiple terminals. As I often use SSH to use port forwarding to get ...
8
votes
1answer
12k views

Can I use ufw to setup a port forward?

Im currently using ufw to enforce some basic firewall rules. Is it possible to also use ufw to do port forwarding? Specifically im wanting to forward incoming traffic to my server (same machine ...
4
votes
2answers
2k views

Port forwarding to virtual machine

I'm running an http(zope) server on Ubuntu 8.04 server, in a Virtualbox machine, on an Ubuntu 9.04 box. The guest system accesses network over NAT. How can I forward the host machine's port 80 to the ...
8
votes
1answer
5k views

iptables: Port forwarding with masquerading is not working

I'm having some issues with my port forwards. NAT seems to work ok and one out of the port forwards seem to work (udp port 7887 to machine 192.168.1.100). But not the others. I doubt that it matters, ...
4
votes
3answers
4k views

Dynamic port forwarding based on hostname or originating ip

I'm a programmer trying to figure out some stuff beyond my domain: Say I have one machine and clients will make tcp (but not http!) connections to it. I want to redirect clients to their own ports ...
2
votes
2answers
2k views

iptables packet forwarding to one of two gateways depending on origin

Given the following installation: old router 192.168.1.1 with NAT forward of tcp port 80 to 192.168.1.10:80 new router 192.168.1.2 with NAT forward of tcp port 80 to 192.168.1.10:80 web ...
2
votes
2answers
448 views

Issue NATing server private interface to loopback (for MySQL)

I'm trying to NAT traffic sent to the server's private interface to the loopback (because MySQL bind-address is on 127.0.0.1 and can't be changed but I still need to reach it via the private ...
2
votes
4answers
628 views

How to browse to a webserver which is reachable through the SSH port only

I have a server at work which is behind a firewall (the company's firewall) so it is reachable only thrugh port 22 (SSH). I'm able to connect to the server with putty without problems. Also, that ...
2
votes
1answer
16k views

How to configure PFSense firewall with external transparent Squid proxy?

I am using PFSense 2.0 and trying to get transparent proxy to work. As the internal Squid won't work with loadbalancing and dual-wan (and it seems Squid doesn't work at all on the latest build), I ...
2
votes
3answers
550 views

Forwarding hostheaders

I have a question about forwarding of the hostheader inside a network. My setup is this: - On the front I have a Linksys router - Behind the router I have 3-4 test webservers with different setups - ...
1
vote
4answers
4k views

SSH remote port forwarding failed

Follow-Up: It looks like the rapid series of disconnects coinciding with a few months of running each server is probably coincidental and just served to reveal the actual problem. The reason it ...
0
votes
1answer
494 views

iptables NAT port fowarding and Apache log IPs

Thanks to quanta, I can now use iptables to port forward SSH through to servers behind the firewall using a single IP and multiple ports - original question here. However, if I use this technique to ...
0
votes
1answer
640 views

Apache port redirect

I know there's a ton of answers to this question out there, but somehow none of them helped me. I have an Ubuntu running 3 webapps, each on different port (8080-8282) - jira, confluence and one more. ...
-1
votes
1answer
183 views

re-route requests on filtered smtp port 25 [closed]

My VPN filters port 25 (to prevent spam) but my ISP doesn't. The VPN takes over all traffic and changes the default gateway? How can I bypass the VPN to send mail? I want all outgoing traffic except ...
4
votes
2answers
2k views

NAT routing and port forwarding on Cisco ASA 5505

I have inherited my first Cisco router and am having trouble understanding how to do NAT port forwarding correctly. ASA: 8.0.2 ASDM: 6.1(1) I have a single external ip address on the outside (via ...
2
votes
1answer
58 views

Multicraft: Port Forwarding through a GRE Tunnel

For the past week I've been attempting to protect a server from DOS attacks by utilizing a GRE tunnel from a VPS to a dedicated machine without much success. Visual: User --> VPS --> Dedicated ...
2
votes
1answer
705 views

Removing port forwardings programmatically on a ControlMaster SSH session

Quite a while ago I got an answer telling me how to add a port-forwarding on a running SSH ControlMaster process. To know that helps a lot, but I'm still missing a way to remove such a port forwarding ...
2
votes
1answer
1k views

My CentOS 5.7 server can't access the internet

I have a CentOS 5.7 server setup in my office. I have recently moved to a new router (Linksys E3200) and I don't seem to be able to access the web at all through it (git, yum etc.). All the other ...
2
votes
2answers
1k views

Iptables: Forwarding packets doesn't work

I have 3 Linux Systems A, B and C. A is a TCP Client and sends a message to TCP Server on C. A can see only the external IP of B which is at wlan0 interface, 192.168.0.3 ------------------ ...
2
votes
2answers
1k views

NAT with iptables to Xen DomU

I am trying to forward packets arriving on the host machine to a virtual machine. Current aim is to forward xxx.xxx.xxx.xxx:3022 to the vm 192.168.10.2:22. I tried adding the following rules through ...
2
votes
1answer
2k views

Port Forwarding with iptables is not working

I´m using an Ubuntu Server Box (10.04) to route my network to internet. This box has 2 ethernet cards (eth0 for internet connection, eth1 for lan - 192.168.1.1) and I would like to forward port 80 to ...
1
vote
4answers
271 views

Prevent closing of SSH Local Port Forwarding

I am running various services on an Ubuntu virtual machine running on Azure, and I would like to access some of the services remotely, even though the ports are not open publicly. To do so I have set ...
1
vote
3answers
595 views

forward port 3306 from firewalled machine to desktop using SSH?

Here's the network setup: Machine A (my PC) SSH 22 => Machine B (Linode with root access) SSH 21343 => Machine C (MySQL server). I want to forward port 3306 from C through B to A, so I can use SQL ...
1
vote
2answers
96 views

Question about port forwarding on router

How to forward from from port 222 to 22 inside local network to ip 192.168.1.103 for example? Have router TPL-Link TL-WR740N_V1 Setting allow to forward only outside port, but not for ip inside ...
0
votes
2answers
2k views

How can i forward the http and ssh port to my internal server using iptables

I do not have the router so i make the Linux system into router having centos 6.4 for forwarding the Public network traffic to my local LAN.It has the two NIC card. one for public ip (eth1) and ...
0
votes
2answers
838 views

sharing a printer over a VPN

We have our head office, that has a static ip and two windows servers a domain server and a file server. We have another office that only has a router and a pc (with a static ip address) now my aim ...
0
votes
1answer
389 views

Routing traffic from VPN to different network device

Finally i got OpenVPN up running, but now i really miss accessing all my webservices (apache, ftp, ssh etc.) through the VPN server. Is there a simple way to route all traffic from my wlan1 device to ...
0
votes
1answer
1k views

Simple iptables port forwarding with masquerading not working

I'm trying to set up a simple VPN server on EC2 (Ubuntu 12.04) with the Android example ToyVpnServer. Its instructions: // There are several ways to play with this program. Here we just give an // ...
0
votes
3answers
2k views

How to route external TCP port 80 into loopback (127.0.0.1) port 8080?

I have a test VDS box with real IP. If i start web server on physical interface port 80, it can be opened from another computer via it's ip address (and default port 80): python -m SimpleHTTPServer ...
0
votes
0answers
369 views

Fowarding port in iptables to internal server

I'm running cPanel/WHM with ConfigServer Firewall (csf). I want to forward port 8080 on my webserver to an internal server with an IP of lets say 10.1.1.1 thats running a webserver on port 80. How ...
0
votes
2answers
2k views

How to use iptables to forward requests to a jBoss server running on a different machine?

I have 3 machines with the following IP addresses : - Machine 1 : - 10.10.10.20 Machine 2 :- 10.10.10.21 Machine 3 : - 10.10.10.22 The jBoss server is started on Machine 1 and Machine 3 is client. ...