Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureFirewall ¶
ConfigureFirewall configures iptables to drop all outgoing RST packets not originating from this uid, therefore preventing a connection reset by the kernel which it is not aware of any of our connections. sudo iptables -A OUTPUT -p tcp --sport <port> --tcp-flags RST RST -m owner ! --uid-owner <uid> -j DROP
func NewRawTCPSock ¶
NewRawTCPSock creates a new AF_INET, SOCK_RAW and IPPROTO_TCP socket and returns it's descriptor.
func RevertFirewall ¶
RevertFirewall deletes the previously set iptables rule.
Types ¶
type EtherSender ¶
type EtherSender struct {
// contains filtered or unexported fields
}
EtherSender wraps a raw socket and the link layer.
func NewEtherSender ¶
func NewEtherSender(iface string) (EtherSender, error)
NewEtherSender creates a new wrapper for sending Ethernet frames.
func (EtherSender) Send ¶
func (s EtherSender) Send(packet []byte) error
Send sends an Ethernet frame.
Click to show internal directories.
Click to hide internal directories.