LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-30-2003, 11:03 PM   #1
d0ugb
LQ Newbie
 
Registered: Sep 2002
Posts: 9

Rep: Reputation: 0
Angry Help with Port Forwarding


I need some help here, im running a netcam server on a windows machine from inside my network, and i would like it to be accessible to the outside world. Im running suse 8.1 pro. My script is very basic and just consists of:

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i et0 -j ACCEPT

i plan to run the netcam server on port 1256. it is working and is accessible from inside my network. I need to know what else i need to add to my firewall script in order to have that port forwarded from the outside world. thnx
 
Old 10-01-2003, 01:00 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Just use:
iptables -A FORWARD -p tcp -i ethX -d your.int.ip.addy --dport 1256 -j ACCEPT

Replace ethX with your external/public device and your.int.ip.addy with the address of your windows box.
 
Old 10-01-2003, 01:24 PM   #3
hakcenter
Member
 
Registered: Apr 2003
Location: Not to far from the computer screen
Distribution: RedHat 9.0
Posts: 324

Rep: Reputation: 30
Quote:
Originally posted by david_ross
Just use:
iptables -A FORWARD -p tcp -i ethX -d your.int.ip.addy --dport 1256 -j ACCEPT

Replace ethX with your external/public device and your.int.ip.addy with the address of your windows box.
You forgot prerouting too lol

iptables -t nat -A PREROUTING -p tcp -i ethX --dport 1256 -j DNAT --to-destination your.int.ip.addy:1256
 
Old 10-01-2003, 10:08 PM   #4
d0ugb
LQ Newbie
 
Registered: Sep 2002
Posts: 9

Original Poster
Rep: Reputation: 0
Still not working

ive tried all the advice, but its still not working. You can connect from machines on the internal network, but not from the outside world.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM
Port 80 forwarding to port 22 with iptables zahoo Linux - Networking 3 02-22-2005 07:22 AM
port forwarding and packet forwarding syrtsardo Linux - Newbie 2 07-03-2003 10:37 AM
How to do ip port forwarding cmardhekar Linux - General 0 08-28-2001 12:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration