|
| |||
| Port forwarding I am trying to forward port 80 on 192.168.1.5 and 127.0.0.1 to 192.168.1.100:8080. I am using a example from the internet but its not working. I am running a proxy server on 192.168.1.100. Can you please tell me how I can get this to work please? I am using one nic card on each computer and I can ping all the ip address on the local network. modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 80 -j DNAT --to 192.168.1.100:8080 iptables -A PREROUTING -t nat -p tcp -d 192.168.1.5 --dport 80 -j DNAT --to 192.168.1.100:8080 iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 53 -j DNAT --to 192.168.1.100:8080 iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to 192.168.1.100:8080 --- Synchronet 3.15a-Win32 NewsLink 1.85 - telnet://sbbs.cyberchatnet.com:23 - |
| |||
| Re: Port forwarding On Mon, 26 Oct 2009 21:32:46 -0400, "phil" <phil@sbbs.cyberchatnet.com.remove-tgz-this> wrote: >I am trying to forward port 80 on 192.168.1.5 and 127.0.0.1 to >192.168.1.100:8080. I am using a example from the internet >but its not working. I am running a proxy server on >192.168.1.100. > >Can you please tell me how I can get this to work please? I am >using one nic card on each computer and I can ping all the ip >address on the local network. > > >modprobe iptable_nat >iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE >echo 1 > /proc/sys/net/ipv4/ip_forward >iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 80 -j DNAT --to >192.168.1.100:8080 >iptables -A PREROUTING -t nat -p tcp -d 192.168.1.5 --dport 80 -j DNAT --to >192.168.1.100:8080 >iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 53 -j DNAT --to >192.168.1.100:8080 >iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to >192.168.1.100:8080 port forwading requires two rules per port, plus optional logging, for example: # the NAT bit iptables -t nat -A PREROUTING -p tcp -i $xf_world \ --dport $torrent_port \ -j DNAT --to-destination $torrent_host # the port-forward, logging iptables -A FORWARD -p tcp -m state --state NEW \ --dport $torrent_port \ $limit_rate_log "JLE:fwd:okay ingress " # the port-forward, action iptables -A FORWARD -p tcp -m state --state NEW \ --dport $torrent_port -j ACCEPT Grant. -- http://bugsplatter.id.au |
| |||
| Re: Port forwarding To: Grant Re: Re: Port forwarding By: Grant to alt.os.linux on Tue Oct 27 2009 12:55:38 > From Newsgroup: alt.os.linux > > On Mon, 26 Oct 2009 21:32:46 -0400, "phil" <phil@sbbs.cyberchatnet.com.remov > > >I am trying to forward port 80 on 192.168.1.5 and 127.0.0.1 to > >192.168.1.100:8080. I am using a example from the internet > >but its not working. I am running a proxy server on > >192.168.1.100. > > > >Can you please tell me how I can get this to work please? I am > >using one nic card on each computer and I can ping all the ip > >address on the local network. > > > > > >modprobe iptable_nat > >iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE > >echo 1 > /proc/sys/net/ipv4/ip_forward > >iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 80 -j DNAT --to > >192.168.1.100:8080 > >iptables -A PREROUTING -t nat -p tcp -d 192.168.1.5 --dport 80 -j DNAT --to > >192.168.1.100:8080 > >iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 53 -j DNAT --to > >192.168.1.100:8080 > >iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to > >192.168.1.100:8080 > > port forwading requires two rules per port, plus optional logging, > for example: > > # the NAT bit > iptables -t nat -A PREROUTING -p tcp -i $xf_world \ > --dport $torrent_port \ > -j DNAT --to-destination $torrent_host > # the port-forward, logging > iptables -A FORWARD -p tcp -m state --state NEW \ > --dport $torrent_port \ > $limit_rate_log "JLE:fwd:okay ingress " > # the port-forward, action > iptables -A FORWARD -p tcp -m state --state NEW \ > --dport $torrent_port -j ACCEPT > > > Grant. > -- > http://bugsplatter.id.au > --- Synchronet 3.15a-Win32 NewsLink 1.85 Can you please give me a example that I can paste and use in my script that will work with the example that I have above? --- Synchronet 3.15a-Win32 NewsLink 1.85 - telnet://sbbs.cyberchatnet.com:23 - |
| |||
| Re: Port forwarding To: phil > Re: Re: Port forwarding > By: Grant to alt.os.linux on Tue Oct 27 2009 12:55:38 > > > From Newsgroup: alt.os.linux > > > > On Mon, 26 Oct 2009 21:32:46 -0400, "phil" > > <phil@sbbs.cyberchatnet.com.remov > > >I am trying to forward port 80 on 192.168.1.5 and 127.0.0.1 to > > >192.168.1.100:8080. I am using a example from the internet > > >but its not working. I am running a proxy server on > > >192.168.1.100. > > > > > >Can you please tell me how I can get this to work please? I am > > >using one nic card on each computer and I can ping all the ip > > >address on the local network. > > > > > > > > >modprobe iptable_nat > > >iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE > > >echo 1 > /proc/sys/net/ipv4/ip_forward > > >iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 80 -j DNAT > > --to >192.168.1.100:8080 > > >iptables -A PREROUTING -t nat -p tcp -d 192.168.1.5 --dport 80 -j DNAT > > --to >192.168.1.100:8080 > > >iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 53 -j DNAT > > --to >192.168.1.100:8080 > > >iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to > > >192.168.1.100:8080 > > > > port forwading requires two rules per port, plus optional logging, > > for example: > > > > # the NAT bit > > iptables -t nat -A PREROUTING -p tcp -i $xf_world \ > > --dport $torrent_port \ > > -j DNAT --to-destination $torrent_host > > # the port-forward, logging > > iptables -A FORWARD -p tcp -m state --state NEW \ > > --dport $torrent_port \ > > $limit_rate_log "JLE:fwd:okay ingress " > > # the port-forward, action > > iptables -A FORWARD -p tcp -m state --state NEW \ > > --dport $torrent_port -j ACCEPT > > > > > > Grant. > > -- > > http://bugsplatter.id.au > > --- Synchronet 3.15a-Win32 NewsLink 1.85 > Can you please give me a example that I can paste and use in my script that > will work with the example that I have above? > I was reffering to a example that I can use this is script so all I have to do is copy and paste it without making modifications to it. modprobe iptable_nat iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 80 -j DNAT --to 192.168.1.100:8080 iptables -A PREROUTING -t nat -p tcp -d 192.168.1.5 --dport 80 -j DNAT --to 192.168.1.100:8080 iptables -A PREROUTING -t nat -p tcp -d 127.0.0.1 --dport 53 -j DNAT --to 192.168.1.100:8080 iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j DNAT --to 192.168.1.100:8080 Thanks --- Synchronet 3.15a-Win32 NewsLink 1.85 - telnet://sbbs.cyberchatnet.com:23 - |
| |||
| Re: Port forwarding Hello, phil a écrit : > I am trying to forward port 80 on 192.168.1.5 and 127.0.0.1 to > 192.168.1.100:8080. That is not very clear. Please explain what is the source host, the original destination and the forwarding host. |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| port mapping / forwarding | ermanu@hotmail.com | Windows XP | 1 | 04-25-2007 08:45 AM |
| Port forwarding | Jack Black | Windows XP | 2 | 01-22-2007 04:15 AM |
| RDP & Port Forwarding | Aussie Girl | Windows XP | 5 | 01-04-2007 05:11 AM |
| ICS Port Forwarding Not Working Right | RedPenguin | Windows XP | 0 | 01-04-2007 05:00 AM |
| Remote Desktop port forwarding | Jeff | Windows XP | 6 | 01-04-2007 04:14 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |