port-forwarding on firewall or via SSH

learn more… | top users | synonyms (1)

19
votes
7answers
14k 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 ...
54
votes
4answers
158k views

How can I port forward with iptables?

I want connections coming in on ppp0 on port 8001 to route to 192.168.1.200 on eth0 on port 8080 I've got these two rules -A PREROUTING -p tcp -m tcp --dport 8001 -j DNAT --to-destination ...
29
votes
3answers
25k 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 \ --dport 443 ...
5
votes
2answers
21k views

How to do the port forwarding from one ip to another ip in same network?

I would like do some NAT in iptables. So that, all the packets coming to 192.168.12.87 and port 80 will be forwarded to 192.168.12.77 port 80. How to do this with iptables? Or Any other ways to ...
8
votes
2answers
811 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 ...
18
votes
8answers
18k 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
13k 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 ...
4
votes
4answers
8k 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 ...
3
votes
2answers
7k 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 ...
2
votes
3answers
13k 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 ...
17
votes
3answers
23k 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
6k 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: # ...
4
votes
3answers
5k 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
3k 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
1answer
620 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
5k 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
2k views

iptables redirected port 80 to 8080 - How to disallow direct access to port 8080?

I've routed all requests from port 80 to port 8080 for my Tomcat server using iptables. iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080 Now http://mydomain.com/ ...
0
votes
2answers
129 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
11k 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 ...
2
votes
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 ...
1
vote
1answer
297 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 ...
0
votes
0answers
433 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
812 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
283 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 ...
22
votes
6answers
21k 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
964 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 ...
11
votes
1answer
15k 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 ...
9
votes
1answer
6k 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, ...
2
votes
1answer
17k 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
4answers
654 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 ...
2
votes
2answers
479 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
667 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
3answers
575 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
2answers
378 views

Forward all traffic on a specific port depending on the domain to another port

Imagine I have 10 different domains. All these domains have an A record to a single IP Address. There are ten different services hosted on this one IP. Let's assume they listen from port :80 to :90. ...
1
vote
1answer
6k views

iptables https transparent proxy with privoxy?

So I have a privoxy running (on port 8080) on a box acting as a router. My goal is to route all HTTP & HTTPS traffic through privoxy on there. HTTP works with the following command iptables -t ...
0
votes
1answer
644 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
729 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
207 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
3k 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 ...
3
votes
3answers
3k views

How do I configure my router under another to avoid NAT issues?

I'm sorry if this has been answered before; I tried looking but couldn't find a solution. I'll try and explain as clearly as I can. I've recently purchased a Rogers Mobile Rocket Hub and it's ...
2
votes
1answer
323 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
961 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
491 views

tomcat6 behind xinetd - real client ip

In server.xml, at the Connector I specify proxyPort as 80. Here's the xinetd service: service http { socket_type = stream protocol = tcp user = tomcat6 ...
2
votes
1answer
2k 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
3answers
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
3k 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 ...
2
votes
1answer
192 views

Port forwarding my home server problem [closed]

I'm trying to set up my laptop as a server for fun. I got XAMPP, and am running Apache server. I know it's working, because when I got to localhost, it correctly displays my index.html. If I go to ...