port-forwarding on firewall or via SSH

learn more… | top users | synonyms (1)

44
votes
4answers
126k 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 ...
26
votes
3answers
20k 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 ...
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 ...
14
votes
3answers
18k 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 ...
12
votes
8answers
16k 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 ...
12
votes
7answers
8k 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 ...
9
votes
1answer
13k 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 ...
8
votes
3answers
8k views

How to forward port 80 to another port on the samemachine?

How can I forward requests coming in on port 80 to another port on the same linux machine? I used to do this by changing nat.conf, but this machine that I'm using doesn't have NAT. What's the ...
8
votes
2answers
695 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 ...
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, ...
8
votes
2answers
1k views

Mac OS X Lion - forward all connections on port 22 to external ip [closed]

I need to forward all connection to any address port 22 to a different gateway (i.e. no default). Firstly I suppose to do it with ipfw: sudo ipfw add 5 fwd $EXTERNAL_IP,22 tcp from any to any 22 ...
7
votes
3answers
43k views

how to forward dns alias to hostname:port? [duplicate]

Possible Duplicate: How to use DNS to redirect domain to specific port on my server My web application is running on myserver.mydomain:10000 I would like to make it available on the ...
6
votes
5answers
4k views

Forward local port or socket file to remote socket file

Quick question - I run two linux boxes, one my own desktop and the other my VPS. For security reasons on the VPS end I opted for socket connections to MySQL (/var/run/mysqld/mysql.sock). I know I can ...
6
votes
2answers
481 views

CentOS port forwarding not working

I'm using CentOS 6.5 and I added the following commands to my iptables to forward all incoming traffic on port 8088 to 4569: iptables -A PREROUTING -t nat -p udp --dport 8088 -i eth0 -j DNAT ...
6
votes
2answers
2k views

How can ssh allowed to setup remote port forwarding but not execute commands?

How can an SSH command be setup to allow port forwarding but not execute commands. I know that the ssh login can use -N to stop commands executing, but can the ssh config file be setup to disallow ...
6
votes
1answer
831 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 ...
5
votes
3answers
1k views

Why does logging out of an SSH session hang when using port-forwarding?

I use dynamic SSH port-forwarding (-D) and normal SSH port-forwarding (-L or -R) for many different things, including adding a layer of encryption to my wireless web traffic. The command I use ...
5
votes
3answers
5k views

Forward FTP with IPTables

I'm trying to forward an FTP-server with IPTables. The FTP-Server is running on a Windows 2008 box (Cerberus). Details Win Box: IP: 192.168.220.51 FTP-Port: 21 PASV-Ports: 11000-13000 The ...
5
votes
4answers
3k views

Use iptables to forward ipv6 to ipv4?

Currently I have a setup where, due to configuration that would take forever to fix, I have a server that can only be accessed by ipv4. I also, however, have a server that can be accessed by ipv6. I ...
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 ...
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 ...
5
votes
2answers
2k views

Exposing IMAP server to Internet: DMZ or Port Forwarding?

We currently have all our email stored on a Dovecot IMAP server in our internal network. Client machines on the network are able to connect and access their email. Now we want to allow certain users ...
5
votes
2answers
1k views

Cannot access Ubuntu server behind Huawei Router with port forwarding

I have an Ubuntu 12.10 server installed and have a static IP from my ISP. Pinging the IP results in success. I also have a Huawei Echo-Life HG-521 modem. I setup port forwarding with instruction from ...
5
votes
1answer
5k views

Forwarding linux terminal from serial port to TCP with socat

I'm working on embedded ARM platform, Slackware. I'm using G24 Java modem which is configured to forward data between ports /dev/ttyS1 and /dev/ttyACM0, so anything that goes onto any of these ports ...
4
votes
3answers
3k views

Forward SSH through SSH tunnel

My situation : Me(localhost) -> Server A(ip:100.100.100.100) =>(server B(ip:192.168.25.100),server....) i'm able to SSH into server since it has a true ip if i then want to connect to server b, i ...
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: # ...
4
votes
2answers
1k views

Vagrant forward a range of ports

Is there a way to forward a range of ports using vagrant 1.2.1 or higher? I know that you can forward any number of ports individually by using config.vm.forward_port 80, 4567 Or, is the answer ...
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 ...
4
votes
1answer
173 views

Setting up IPTables

I am trying to remove a router from our product and replacing all its functionality with the use of iptables. The system is required to perform general traffic control as well as forwarding data to ...
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 ...
4
votes
1answer
10k views

SSH Reverse Port Forwarding with PuTTy - how to specify bind address

Using Putty, I have set up a reverse proxy which allows me to connect on port 8080 of the server at server.tld to port 80 of the machine which initiated the SSH connection. The server allows me to ...
4
votes
2answers
2k views

Forward differing hostnames to different internal IPs through NAT router

I have one public IP address, one router and multiple servers behind the router. I would like to forward differing domains (All using HTTP) through the router to different servers. For example: ...
4
votes
4answers
2k views

ssh port forwarding freezes after 10 simultaneous connections

I am using port forwarding to utilize proxy server which is on remote machine. Remote machine hostname is remotemachine. Proxy is listening on 8118 port. I am translating this port to local port ...
4
votes
1answer
4k views

DNS Server Behind NAT

I've got a Bind 9 DNS server sitting behind a NAT firewall, assume the Internet facing IP is 1.2.3.4 There are no restrictions on outgoing traffic, and port 53 (TCP/UDP) is forwarded from 1.2.3.4 to ...
4
votes
1answer
2k views

Remote access to internal machine (ssh port-forwarding)

I have a server (serv05) at work with a public ip, hosting two KVM guests - vtest1 & vtest2 - in two different private network - 192.168.122.0 & 192.168.100.0 - respectively, this way: ...
4
votes
1answer
1k views

OpenBSD pf port forwarding multiple rules

I have a few dozen servers behind OpenBSD firewall with port forwarding. Most rules are very similar and differ only in IPs or sometimes in ports forwarded, so I want to compact them to remove ...
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 ...
3
votes
3answers
2k views

Registering SIP phone (X-Lite) to asterisk server (asteriskNow)

We currently have a school-project going in which we need to set up an PBX with Asterisk. Thus we have installed asteriskNow in a virtual environment (with virtualBox) on ubuntu 12.10. We tried the ...
3
votes
2answers
474 views

What is the difference between SSH and SSH Tunneling

As the title says, I don't really understand the difference between them. For example, if I connect to a specific server through SSH without tunneling I get the same shell as I get with tunneling.
3
votes
1answer
298 views

How to allow the internet to view my website on http://192.168.x.x (IP address behind router)? [closed]

I have installed a server in one of my computer, I am using a router, I can go to the server from my other networked computers by defining the ip address in the address bar, like 192.168.1.101. all ...
3
votes
2answers
864 views

VPC SSH port forward into private subnet

Ok, so I've been racking my brain for DAYS on this dilema. I have a VPC setup with a public subnet, and a private subnet. The NAT is in place of course. I can connect from SSH into a instance in the ...
3
votes
7answers
27k views

Port forwarding with Windows Server 2008

I have Windows 2008 server. It works as a mail, ftp, web server. In my LAN there is other server and i want to reach this server with RDC from outside my lan, (example: domail.com:5555 -> ...
3
votes
2answers
58 views

source address with iptables port forwarding

I set up port forwarding for port 80 with iptables: iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 10080 Additionally, I have ip forwarding enabled to route connections ...
3
votes
2answers
838 views

SSH remote port forwarding

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

Create NAT rule and security policies for port 443/80 on a Cisco ASA 5510

I've been trying to setup NAT and give access to a public IP address to my local network, I just can't get it to work. It's my first time using a Cisco firewall. Thanks for your help!
3
votes
1answer
3k views

Use iptables to forward ssh

i found several tutorials on how to do it, but got none of them to work :/ My setup: FIREWALL - reachable from the internet - eth0: xxx.xxx.xxx.xxx (public ip) - eth1: 192.168.1.1 SERVER - ...
3
votes
2answers
699 views

Workarounds for probable TIME_WAIT issue preventing reestablishing broken SSH tunnels?

While not intending to cross-post, after sending this question to the OpenSSH list on SecurityFocus, I noticed that the list is rather low traffic (the previous post was approximately 5 months prior). ...
3
votes
1answer
5k views

Windows 7 with internal port redirection, is it possible?

I received a request from one of our developers that I am having trouble solving. Here in the office they use linux desktops and I can forward the localhost:80 via a iptables nat to localhost:8080. ...
3
votes
3answers
2k views

Problems configuring an SSH tunnel to a Nexentastor appliance for use with headless Crashplan

Problem I am attempting to configure an SSH tunnel to a NexentaStor appliance from either a Windows or Linux computer so that I can connect a Crashplan Desktop GUI to a headless Crashplan server ...
3
votes
1answer
346 views

Forward socket to multiple ports

I have two network servers I'd like to test in parallel using live data. I'd like to have something listen on port A and forward the traffic to both port B and port C. The data stream in inbound only ...