| | |
how to setup port?
![]() |
•
•
Join Date: Nov 2007
Posts: 227
Reputation:
Solved Threads: 0
hi,
does anyone know how to setup a port# to each PC of my home network? say 192.168.1.1 is my gateway,, 192.168.1.2 is my linux machine. and my public ip is 1.2.3.4 ... how do i make my 192.168.1.2 a port#(ex: port# 10) so when i ssh from outside my home network, i can do something like "1.2.3.4:10" ?
thanks very much
does anyone know how to setup a port# to each PC of my home network? say 192.168.1.1 is my gateway,, 192.168.1.2 is my linux machine. and my public ip is 1.2.3.4 ... how do i make my 192.168.1.2 a port#(ex: port# 10) so when i ssh from outside my home network, i can do something like "1.2.3.4:10" ?
thanks very much
Its called port forwarding or NAT and the implemention depends on what type of router you have. If your router is a linux router you can use iptables:
If you have a netgear, linksys, etc firewall then you should be able to set up forward rules through the GUI on the router @ http://192.168.1.1
bash Syntax (Toggle Plain Text)
#!/bin/sh iptables -t nat -F iptables -t filter -F iptables -t nat -I PREROUTING -i eth0 -d 1.2.3.4 -p tcp --dport 10 -j DNAT --to-destination 192.168.1.2:10 iptables -t nat -A PREROUTING -d 1.2.3.4 -j ACCEPT iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -j SNAT --to-source 1.2.3.4
If you have a netgear, linksys, etc firewall then you should be able to set up forward rules through the GUI on the router @ http://192.168.1.1
![]() |
Similar Threads
- Optimum Online Web Hosting. (Networking Hardware Configuration)
- IIS works on local machine, but not on network (Windows Servers and IIS)
- IP address (Windows Servers and IIS)
- Odd connection problems; NetGear RsngeMax Next Router (Networking Hardware Configuration)
- Linker Error (C++)
- Configuring mac's built-in firewall (Darwin, X11 and BSD)
- My ip address goes directly to my DSL modem (Domains and DNS)
- How do i set up 2 nics with 1 for up and one for down (Networking Hardware Configuration)
- PCI modem help needed (PCI and Add-In Cards)
- Is this network setup ok? (Networking Hardware Configuration)
Other Threads in the Domains and DNS Forum
- Previous Thread: Am novice,would like to communicate with pro,about starting website
- Next Thread: help VPS on godaddy.com and domain in verio-hosting.com
| Thread Tools | Search this Thread |
2010 apps brands broadband business copyright country cybersquatting dns dnsservers domain domain-name domainname domains economy flake gay google government hacker hacking icann intellectual internet ip ipv6 kaminsky legal mapping marketing measurment microsoft networking news payperclick phishing property registration rural security securityflaw size strider terrorism top10 trademark typo-squatting verisign web zone






