/* HINT: Search archives @ http://www.indyramp.com/masq/ before posting! */
Hello,
** PLEASE REPLY DIRECT TO [EMAIL PROTECTED] AS I AM ONLY SUBSCRIBED TO THE
LIST IN DIGEST MODE :) **
I have been running an IP Chains firewall and masquerading setup for a
while.
I have just written a cgi-script on one of my other machines, to return a
picture from a web cam. I figured the easiest way to get this on to the
internet is with port forwarding.
First of all, please could someone tell me what the differences between
portfw, autofw and mfw are, and which one I should be using ??
First of all I made sure I had the PORT_FW option turned on in the kernel.
Then, I downloaded, compiled and installed ipmasqadm, and added the
following lines to my firewall script, just below the IP Masquerading
section:
/usr/sbin/ipmasqadm portfw -f
/usr/sbin/ipmasqadm portfw -a -P tcp -L XX.XX.XX.XX 81 -R 192.168.0.9 80
XX.XX.XX.XX being my dynamic IP at that time
192.168.0.9 being the machine I want to connect to.
Pointing a web browser to 62.252.241.92 provided the web server on the IP
Masq box :) but pointing to 62.252.241.92:81 gave a DNS error.
I then had a thought, and added lines to my firewall script to ACCEPT
input/output on port 81. This did the same as above.
I then created a script as follows, which also didn't work, giving the same
results as above (but no errors when running it):
ipchains -F
echo "1" > /proc/sys/net/ipv4/ip_forward
ipchains -P input ACCEPT
ipchains -P output ACCEPT
ipchains -P forward DENY
ipchains -A forward -j MASQ -s 192.168.0.0/24
/usr/sbin/ipmasqadm portfw -f
/usr/sbin/ipmasqadm portfw -a -P tcp -L 62.252.241.92 81 -R 192.168.0.9 80
I also tried the -l switch:
# ipmasqadm portfw -l
prot localaddr rediraddr lport rport pcnt pref
TCP xxxx-xxx-xxxxxx.xxx.xxx.com SGI-Indy 81 www
10 10
(xxx.. was the hostname given to me by my ISP)
It seems to have resolved the IP's OK, and I can ping 192.168.0.9 and
sgi-indy no problems and connect to the locally in a web browser.
Any ideas anyone??
Thanks in Advance!
Ian
([EMAIL PROTECTED])
_______________________________________________
Masq maillist - [EMAIL PROTECTED]
Admin requests can be handled at http://www.indyramp.com/masq-list/ -- THIS INCLUDES
UNSUBSCRIBING!
or email to [EMAIL PROTECTED]
PLEASE read the HOWTO and search the archives before posting.
You can start your search at http://www.indyramp.com/masq/
Please keep general linux/unix/pc/internet questions off the list.