A Broadband and ADSL forum. BroadbanterBanter

Welcome to BroadbanterBanter.

You are currently viewing as a guest which gives you limited access to view most discussions and other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today.

Go Back   Home » BroadbanterBanter forum » Newsgroup Discussions » uk.comp.home-networking (UK home networking)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.comp.home-networking (UK home networking) (uk.comp.home-networking) Discussion of all aspects of computer networking in the home, regardless of the platforms, software, topologies and protocols used. Examples of topics include recommendations for hardware or suppliers (e.g. NICs and cabling), protocols, servers, and specific network software. Advertising is not allowed.

Port Forwarding Software based on packet content



 
 
Thread Tools Display Modes
  #1  
Old September 8th 04, 02:34 PM posted to uk.comp.home-networking
gbnews
external usenet poster
 
Posts: 15
Default Port Forwarding Software based on packet content

Hi guys,

I'm trying to find some software that will allow me to port forward based
the content of the packet.

Basically. Connection comes in on port 80 at router, the router forwards
this to machine A on port 80. This is where I need the software to inspect
the packet, and if it has something like 'HTTP' in it then forward it to
machine B on port X, if it does not have 'HTTP' in the packet then forward
it to machine A on port X (obviously other than 80).

Anyone know of such software? I can't find any anywhere.

TIA,

--
gbnews )


  #2  
Old September 8th 04, 04:58 PM posted to uk.comp.home-networking
Alex Fraser
external usenet poster
 
Posts: 553
Default Port Forwarding Software based on packet content

"gbnews" wrote in message
...
Basically. Connection comes in on port 80 at router, the router forwards
this to machine A on port 80. This is where I need the software to
inspect the packet, and if it has something like 'HTTP' in it then forward
it to machine B on port X, if it does not have 'HTTP' in the packet then
forward it to machine A on port X (obviously other than 80).

Anyone know of such software? I can't find any anywhere.


What you want is beyond the capabilities of simple port forwarding, and from
your description, a robust solution may be impossible. I have written some
software which does something faintly similar but is Linux-specific (and
must run on a router between source and destination for both data
directions).

Can you rephrase the problem? It sounds like what you're saying is that
connections from the Internet to your router's external address on port 80
should effectively connect to different machines depending on which of two
purposes for the connection it is, and one of the purposes is to make an
HTTP request. Have I got this right, and if so, what is the other purpose?

Alex


  #3  
Old September 8th 04, 05:20 PM posted to uk.comp.home-networking
Rob Morley
external usenet poster
 
Posts: 1,379
Default Port Forwarding Software based on packet content

In article , "Alex Fraser"
says...
"gbnews" wrote in message
...
Basically. Connection comes in on port 80 at router, the router forwards
this to machine A on port 80. This is where I need the software to
inspect the packet, and if it has something like 'HTTP' in it then forward
it to machine B on port X, if it does not have 'HTTP' in the packet then
forward it to machine A on port X (obviously other than 80).

Anyone know of such software? I can't find any anywhere.


What you want is beyond the capabilities of simple port forwarding, and from
your description, a robust solution may be impossible. I have written some
software which does something faintly similar but is Linux-specific (and
must run on a router between source and destination for both data
directions).

Can you rephrase the problem? It sounds like what you're saying is that
connections from the Internet to your router's external address on port 80
should effectively connect to different machines depending on which of two
purposes for the connection it is, and one of the purposes is to make an
HTTP request. Have I got this right, and if so, what is the other purpose?

My guess is that he wants to enable access from another machine that is
restricted by a firewall - tunneling may be an option, depending on the
control the user has on the other machine, or otherwise maybe a web
application that can do whatever it is that he's attempting.
  #4  
Old September 9th 04, 02:23 PM posted to uk.comp.home-networking
gbnews
external usenet poster
 
Posts: 15
Default Port Forwarding Software based on packet content

Basically. Connection comes in on port 80 at router, the router
forwards this to machine A on port 80. This is where I need the
software to inspect the packet, and if it has something like 'HTTP'
in it then forward it to machine B on port X, if it does not have
'HTTP' in the packet then forward it to machine A on port X
(obviously other than 80).

Anyone know of such software? I can't find any anywhere.


What you want is beyond the capabilities of simple port forwarding,
and from your description, a robust solution may be impossible. I
have written some software which does something faintly similar but
is Linux-specific (and must run on a router between source and
destination for both data directions).

Can you rephrase the problem? It sounds like what you're saying is
that connections from the Internet to your router's external address
on port 80 should effectively connect to different machines
depending on which of two purposes for the connection it is, and one
of the purposes is to make an HTTP request. Have I got this right,
and if so, what is the other purpose?

My guess is that he wants to enable access from another machine that
is restricted by a firewall - tunneling may be an option, depending
on the control the user has on the other machine, or otherwise maybe
a web application that can do whatever it is that he's attempting.


Bingo. Problem is I can only go out at port 80, so I use this to connect to
my router for SSH. The problem is, I would like to now set-up a simple web
server, and obviously would want that accepting on port 80 too. If I could
find another port I could go out on, it wouldn't be a problem as I would
move ssh to another port. Hence why I would like some sort of packet
filerting/forwarding software.
--
gbnews )


  #5  
Old September 9th 04, 05:04 PM posted to uk.comp.home-networking
Alex Fraser
external usenet poster
 
Posts: 553
Default Port Forwarding Software based on packet content

"gbnews" wrote in message
...
Bingo. Problem is I can only go out at port 80, so I use this to
connect to my router for SSH.


Do you mean that you currently connect to the router's external address,
port 80, from somewhere that only allows outbound connections to port 80,
and that your router is currently configured to forward this connection to
one of your machines which runs an SSH server?

The problem is, I would like to now set-up a simple web server, and
obviously would want that accepting on port 80 too.


Do you mean you now wish to run a web server accessible at the router's
external address, but also (for obvious reasons) on port 80?

The basic problem is that there is no way to distinguish between connections
from (for example) a browser or SSH client until after the connection is
accepted, and once a connection has been accepted, it is practically
impossible to "transfer" it.

Alex


  #7  
Old September 10th 04, 12:25 AM posted to uk.comp.home-networking
gbnews
external usenet poster
 
Posts: 15
Default Port Forwarding Software based on packet content

Alex Fraser wrote:
"gbnews" wrote in message
...
Bingo. Problem is I can only go out at port 80, so I use this to
connect to my router for SSH.


Do you mean that you currently connect to the router's external
address, port 80, from somewhere that only allows outbound
connections to port 80, and that your router is currently configured
to forward this connection to one of your machines which runs an SSH
server?


Yes.

The problem is, I would like to now set-up a simple web server, and
obviously would want that accepting on port 80 too.


Do you mean you now wish to run a web server accessible at the
router's external address, but also (for obvious reasons) on port 80?

The basic problem is that there is no way to distinguish between
connections from (for example) a browser or SSH client until after
the connection is accepted, and once a connection has been accepted,
it is practically impossible to "transfer" it.


Yes again. Well that can't be right.. the majority of web browsers send
there request with a HTTP header in the packet. Some software could surely
be able to forward all of these requests in to a different port. I do
understand in what your saying that it would be very difficult, as the
connection is already accepted before the packet contents are read. I don't
think i'm going to be able to find any software, and will have to try and
find another port I can go out on.
--
gbnews )


  #9  
Old September 10th 04, 01:57 AM posted to uk.comp.home-networking
THe NuTTeR
external usenet poster
 
Posts: 64
Default Port Forwarding Software based on packet content

8080 (normally used for proxies or alternate webserver port)
110 (POP3)
53 (DNS, IIRC)
143 (IMAP)
20 (FTP data)
23 (Telnet)
25 (SMTP)
119 (NNTP)
123 (NTP)
Thats prolly all the main ones.
If you search google for "TCP Port listings" it will give you an IANA
page (www.iana.org/assignments/port-numbers) which might give you ideas

DynDNS.org offer a service that will forward a web request to a port
other than port 80 intended for use when ISPs block port 80 to prevent
webhosting, or IIS exploits. That would work, continue to use port 80
for SSH, and the DynDNS service for web hosting. Although you may still
need to be able to connect on that port

One of the "secure" browsing sites would also let you access the
website, as that computer makes the connection, can't remember any now,
but they are also used to get round content filtering, as the browsed
content is encrypted, and comes from a non-blocked site.

hope i have helped


"gbnews" wrote in message
...
Rob Morley wrote:
In article , "gbnews"
says...
snip
Bingo. Problem is I can only go out at port 80, so I use this to
connect to my router for SSH. The problem is, I would like to now
set-up a simple web server, and obviously would want that accepting
on port 80 too. If I could find another port I could go out on, it
wouldn't be a problem as I would move ssh to another port. Hence
why I would like some sort of packet filerting/forwarding software.

Have you not got access on port 443 (HTTPS) that you could use
instead
of port 80?
You could always run your HTTP server on a different port.


Port 443. I'll try that one Rob. There's always port 21 as well, but I
have a FTP server running on that. Any other ports you think might be
open on the way out?
--
gbnews )



  #10  
Old September 10th 04, 06:50 AM posted to uk.comp.home-networking
Alex Fraser
external usenet poster
 
Posts: 553
Default Port Forwarding Software based on packet content

"gbnews" wrote in message
...
Alex Fraser wrote:

[snip]
The basic problem is that there is no way to distinguish between
connections from (for example) a browser or SSH client until after
the connection is accepted, and once a connection has been accepted,
it is practically impossible to "transfer" it.


Yes again. Well that can't be right.. the majority of web browsers send
there request with a HTTP header in the packet.


But, unfortunately, not the *first* packet. There is an exchange (ie the
machine being connected also sends stuff) first. With reference to my
previous post, this exchange results in the connection becoming accepted,
and is what ties it to the machine.

What this doesn't preclude is making a new connection, something like a
proxy. This is basically like software I mentioned I wrote in my first post:
it accepts the connection, figures out somewhere else to connect to,
connects and then relays information. (The Linux-specific stuff and the
constraint of running on a router allows this second connection to appear to
be from the original connecting machine.)

However, unlike what I'm using it for, you cannot robustly detect the
difference between an SSH and HTTP connection even after it's been accepted.
All you can do is say "If you haven't received an HTTP request after N
seconds, assume it's an SSH connection."

[snip]
I don't think i'm going to be able to find any software, and will have to
try and find another port I can go out on.


I think there's a good chance there's at least one other port you can use;
443 is the most likely.

Alex


 




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Content filtering software / suggestions ? Colin Wilson uk.telecom.broadband (UK broadband) 2 December 3rd 04 12:44 AM
Port Forwarding not working in XP Fred Finisterre uk.comp.home-networking (UK home networking) 1 June 16th 04 01:53 AM
Port forwarding on Conexant 4 port adsl router Graham Russell uk.telecom.broadband (UK broadband) 14 October 24th 03 11:16 PM
Port forwarding on Conexant 4 port adsl router Graham Russell uk.telecom.broadband (UK broadband) 1 October 17th 03 01:09 PM
port forwarding James uk.comp.home-networking (UK home networking) 3 August 29th 03 12:31 PM


All times are GMT +1. The time now is 04:51 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.Content Relevant URLs by vBSEO 2.4.0
Copyright 2004-2019 BroadbanterBanter.
The comments are property of their posters.