|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
ipfw problems
Hello, I just migrated to FreeBSD from Linux and I was having some problems finding information on how to masquerade private internal IPs on the windows machine to a external IP configured the rl0 interface of the FreeBSD gateway. I have googled every site but I havn't found anything regarding my problem.
My network is like so(Any comments accepted): 3 Windows machines -> Wireless Linksys Router -> FreeBSD (PPPoE)-> ADSL -> Internet with a /25 class C block. The connection between the LAN and internet works fine, but I would like to redirect/forward each of my internal ips to a external IP configured on my rl0 FreeBSD box, were 192.168.0.1 would show up as 70.x.x.250 to the outside world instead of 70.x.x.254 which is my default gateway IP. Every IP for my windows machines shows up as the gateway IP to the outside world, which really bothers me. I know how to do this sort of thing in Linux, it goes something like dis: iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.1 -j SNAT --to 70.x.x.250 Does anyone know how to do this similar command with ipfw?? You do this for every private ip on your LAN that you want to alter the source packets from and redirect them to a single destination IP. My natd.conf consist of this: alias_address 70.x.x.250 redirect_address 192.168.0.1 70.x.x.250 and i run natd -f /etc/natd.conf Added the following with ipfw: ipfw add fwd 192.168.0.1 ip from any to 70.x.x.250 via tun0 I'm probably doing something wrong with the ipfw, any help appreciated and thank you for your time. |
|
#2
|
|||
|
|||
|
Quote:
The FreeBSD handbook (1, 2) contains a step by step tutorial. NAT isn't done by forwarding ("fwd") but using "divert" sockets to send the packets to the userspace nat daemon: "ipfw add divert natd ip from any to 70...." hth, M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > ipfw problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|