Quote:
Originally Posted by chort
I don't see anything obvious right off hand. The best bet is to simultaneously run a tcpdump on rl1 of OpenBSD-1, and also on OpenBSD-2. See if the packets match up. Also, make sure you have logging setup for PF and check to see if packets are being discarded for some reason:
http://www.openbsd.org/faq/pf/logging.html
PS What's the output of:
Code:
$ sudo pfctl -sn && sudo pfctl -sr
?
|
Hi Chort, thank you for answer; I did some debeuging before and packets come to openBSD-2, but on laptop I did not get web page. I just want to make this traffic redirection and leter on use it for my home firewall. But for some reason I cannot find out what could be reason not to get web page.
Anyway thank you very much for comments.
Kind regards
on rl0 on openBSD-2 :
tcpdump -i rl0 not port 22
tcpdump: listening on rl0, link-type EN10MB
22:34:34.234288 192.168.1.1.36412 > 172.16.1.20.www: S 1417226230:1417226230(0) win 0 <mss 1460> (DF) [tos 0x10]
on openBSD-1 on rl1 :
tcpdump -i rl1 not port 22
tcpdump: listening on rl1, link-type EN10MB
09:31:54.366154 192.168.1.1.36412 > 172.16.1.20.www: S 1417226230:1417226230(0) win 0 <mss 1460> (DF) [tos 0x10]
and on fxp0 on openBSD-1--interface I am connected with my laptop on :
09:31:54.365998 192.168.1.1.36412 > 192.168.1.120.www: S 962803895:962803895(0) win 5840 <mss 1460,sackOK,timestamp 304736 0,nop,wscale 6> (DF)
09:31:54.366038 192.168.1.120.www > 192.168.1.1.36412: S 1746605498:1746605498(0) ack 962803896 win 0 <mss 1460> (DF) [tos 0x10]
09:31:54.366128 192.168.1.1.36412 > 192.168.1.120.www: . ack 1 win 5840 (DF)
output of pf rules is :
pfctl -g -s rules| grep '^@'
@0 scrub in all fragment reassemble
@0 block drop in on fxp0 all
@1 pass in on fxp0 inet proto tcp from any to (fxp0:1) port = ssh flags S/SA keep state
@2 pass in on fxp0 inet proto tcp from any to (fxp0:1) port = www flags S/SA keep state
@3 pass out all flags S/SA keep state
@4 pass in on fxp0 inet proto tcp from any to 172.16.1.20 port = www flags S/SA synproxy state
@5 pass in inet proto icmp all icmp-type echoreq keep state
# pfctl -sr
scrub in all fragment reassemble
block drop in on fxp0 all
pass in on fxp0 inet proto tcp from any to (fxp0) port = ssh flags S/SA keep state
pass in on fxp0 inet proto tcp from any to (fxp0) port = www flags S/SA keep state
pass out all flags S/SA keep state
pass in on fxp0 inet proto tcp from any to 172.16.1.20 port = www flags S/SA synproxy state
pass in inet proto icmp all icmp-type echoreq keep state
# pfctl -sn
nat on fxp0 inet from 172.16.1.10 to any -> (fxp0) round-robin
rdr on fxp0 inet proto tcp from any to 192.168.1.120 port = www -> 172.16.1.20 port 80