[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [SLUG] IP Forwarding problems




Yes, except where are you getting portfw from?

You probably have to install it and / or re-cmpile the kernel, right?

Regards
Bernhard

-----Original Message-----
From: owner-slug@nospam.newtreno.spectrum.com.au
[mailto:owner-slug@nospam.newtreno.spectrum.com.au]On Behalf Of Dave Kempe
Sent: Monday, 26 June 2000 08:38
To: Stephen Graham; slug@nospam.slug.org.au
Subject: RE: [SLUG] IP Forwarding problems


Well say if you wanted to forward PC Anywhere you would use these lines:
# PC Anywhere
ipmasqadm autofw -r tcp 5631 5632 -h 192.168.1.1
ipmasqadm autofw -r udp 5631 5632 -h 192.168.1.1

The syntax for the autofw module is different to the portfw.

[root@nospam.gateway /root]# ipmasqadm portfw
Usage: portfw -a -P PROTO -L LADDR LPORT -R RADDR RPORT [-p PREF] add entry
       portfw -d -P PROTO -L LADDR LPORT [-R RADDR RPORT]         delete
entry
       portfw -f                                                  clear
table
       portfw -l                                                  list table
       portfw <args> -n                                           no names

PROTO is the protocol, can be "tcp" or "udp"
LADDR is the local interface receiving packets to be forwarded.
LPORT is the port being redirected.
RADDR is the remote address.
RPORT is the port being redirected to.
PREF  is the preference level (load balancing, default=10)
[root@nospam.gateway /root]#

Looks like your syntax is prob right... Try clearing the table?

dave


> -----Original Message-----
> From: owner-slug@nospam.newtreno.spectrum.com.au
> [mailto:owner-slug@nospam.newtreno.spectrum.com.au]On Behalf Of Stephen Graham
> Sent: Monday, 26 June 2000 4:12 AM
> To: slug@nospam.slug.org.au
> Subject: [SLUG] IP Forwarding problems
>
>
> Hey
>
> I am having a problem setting up IP forwarding on my 2.2.14 kernel.
>
> I have tried to forward all WWW requests from the external IP
> address to an
> internal address, but with no joy.
> The command I am trying is:
>
> ipmasqadm portfw -a -P tcp -L a.b.c.d 80 -R 192.168.0.100 80
> where a.b.c.d is my IP address and 192.168.0.100 is the internal
> web serving
> machine.
>
> I am using a farily bare-bones IP chainset at the moment in order to get
> this thing up and running
> The salient bits are:
> echo "1" > /proc/sys/net/ipv4/ip_forward
> echo "1" > /proc/sys/net/ipv4/ip_dynaddr
> /sbin/ipchains -M -S 7200 10 160
> /sbin/ipchains -A input -j ACCEPT -i eth0 -s 0/0 67 -d 0/0 68 -p udp
> /sbin/ipchains -P forward DENY
> /sbin/ipchains -A forward -s 192.168.0.0/24 -j MASQ
>
> Note that I am allowing the bootp stuff through since I am sitting on an
> Optus cable (DHCP).
>
> I tried ACCEPTing all forwarded packets, but that did not help at
> all.  Any
> hints as to what I am doing wrong would be most appreciated.
>
> Cheers
>
> Stephen Graham
>
> NB - I have no intention of running a web server (in case the
> Optus 'server
> police' read this), it is just the easiest thing I knew to test if I had
> forwarding running OK.  I really need to know so that I can get
> SpeakFreely
> running.
>
> --
> If it weren't for the last minute, nothing would ever get done.
>
>
> --
> SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
> To unsubscribe send email to slug-request@nospam.slug.org.au with
> unsubscribe in the text
>

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text