Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
November 24, 2024, 05:15:15 PM
News
: LinuxSolved.com Linux Help Community Forum..
Home
Search
Login
Register
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
»
Network Troublshooting
»
General Networking Support in Linux
»
Port forwarding with iptables?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Port forwarding with iptables? (Read 10918 times)
MiG-15
Linux Noob !
Posts: 8
Port forwarding with iptables?
«
on:
November 04, 2003, 03:24:54 PM »
i want to forward, for example port 82, to 192.168.1.20 behind my router when it receives the port request from my outside ip.... any help on the rule. i tried PREROUTING in the nat table, but it didnt work, maybe i did it wrong...
Logged
Ricky
LST CareTaker
Specially Skilled
Posts: 2381
Port forwarding with iptables?
«
Reply #1 on:
November 04, 2003, 03:32:25 PM »
Have enabled the following??
Code:
[Select]
echo 1 > /proc/sys/net/ipv4/ip_forward
Logged
MiG-15
Linux Noob !
Posts: 8
Port forwarding with iptables?
«
Reply #2 on:
November 04, 2003, 03:34:29 PM »
yup, i have all the forwarding and masquerading working fine, i have a cable modem shared to my lan, but i want to forward ports to certain computers in my lan
Logged
jayakrishnan
Linux Noob !
Posts: 5
Port forwarding with iptables?
«
Reply #3 on:
November 13, 2003, 11:35:00 AM »
[code]#!/bin/bash
echo 1 >/proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -d 192.168.0.0/255.255.255.0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 202.88.186.76/255.255.255.0 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.0.0/255.255.255.0 -o eth0 -j SNAT --to-source 202.88.186.76
This may help. this is what i use on my gateway server
Logged
Print
Pages: [
1
]
« previous
next »
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
»
Network Troublshooting
»
General Networking Support in Linux
»
Port forwarding with iptables?